From f9d272779ee677f79752d1d62f43dd4e480e46da Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 13 Aug 2020 11:37:46 +0200 Subject: [PATCH] add a hint component --- docs/src/components/Hint/index.vue | 17 +++++++++++++++++ docs/src/components/Hint/style.scss | 10 ++++++++++ docs/src/docPages/getting-started.md | 6 +++++- docs/src/main.js | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 docs/src/components/Hint/index.vue create mode 100644 docs/src/components/Hint/style.scss diff --git a/docs/src/components/Hint/index.vue b/docs/src/components/Hint/index.vue new file mode 100644 index 00000000..e774dac0 --- /dev/null +++ b/docs/src/components/Hint/index.vue @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/docs/src/components/Hint/style.scss b/docs/src/components/Hint/style.scss new file mode 100644 index 00000000..c6f1a912 --- /dev/null +++ b/docs/src/components/Hint/style.scss @@ -0,0 +1,10 @@ +.hint { + padding: 1rem; + border: 2px solid rgba($colorBlack, 0.1); + border-radius: 0.25rem; + + &--warning { + border-color:#ffd8a8; + background-color: #fff4e6; + } +} \ No newline at end of file diff --git a/docs/src/docPages/getting-started.md b/docs/src/docPages/getting-started.md index eec29c6d..c1745d09 100644 --- a/docs/src/docPages/getting-started.md +++ b/docs/src/docPages/getting-started.md @@ -22,7 +22,11 @@ Create a new Vue component (you can call it ``) and add the following -> If you are using Nuxt.js, note that tiptap needs to run in the client, not on the server. Wrapping the editor in a `` tag is required. + + +If you are using **Nuxt.js**, note that tiptap needs to run in the client, not on the server. Wrapping the editor in a `` tag is **required**. + + Congrats! You’ve got it! 🎉 Let’s start to build your editor in the next step. diff --git a/docs/src/main.js b/docs/src/main.js index ceb96a51..3b225b13 100644 --- a/docs/src/main.js +++ b/docs/src/main.js @@ -3,12 +3,14 @@ import 'prismjs/components/prism-jsx.js' import 'prismjs/components/prism-scss.js' import App from '~/layouts/App' import Demo from '~/components/Demo' +import Hint from '~/components/Hint' import Tab from '~/components/Tab' import ReactRenderer from '~/components/ReactRenderer' export default function (Vue, { router, head, isClient }) { Vue.component('Layout', App) Vue.component('Demo', Demo) + Vue.component('Hint', Hint) Vue.component('Tab', Tab) Vue.component('ReactRenderer', ReactRenderer) }