From 6f608b0602b56e37570a66e5c9f01bfbee2bff3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 4 Feb 2021 23:41:41 +0100 Subject: [PATCH] add buttons --- docs/src/assets/icons/arrow-right.svg | 3 ++ docs/src/components/Btn/index.vue | 73 +++++++++++++++++++++++++++ docs/src/components/Btn/style.scss | 58 +++++++++++++++++++++ docs/src/components/Icon/style.scss | 4 +- docs/src/pages/index.vue | 67 +++++++++++++----------- 5 files changed, 173 insertions(+), 32 deletions(-) create mode 100644 docs/src/assets/icons/arrow-right.svg create mode 100644 docs/src/components/Btn/index.vue create mode 100644 docs/src/components/Btn/style.scss diff --git a/docs/src/assets/icons/arrow-right.svg b/docs/src/assets/icons/arrow-right.svg new file mode 100644 index 00000000..0a748a12 --- /dev/null +++ b/docs/src/assets/icons/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/src/components/Btn/index.vue b/docs/src/components/Btn/index.vue new file mode 100644 index 00000000..b94196ff --- /dev/null +++ b/docs/src/components/Btn/index.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/docs/src/components/Btn/style.scss b/docs/src/components/Btn/style.scss new file mode 100644 index 00000000..c2d0494c --- /dev/null +++ b/docs/src/components/Btn/style.scss @@ -0,0 +1,58 @@ +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 12px; + font-weight: 700; + margin-left: 0.75rem; + padding: 0.8rem 1rem; + font-size: 1rem; + text-align: center; + line-height: 1; + text-decoration: none; + + white-space: nowrap; + + &--primary { + background-color: $colorBlack; + color: $colorWhite; + border: 3px solid $colorBlack; + + &:hover { + color: $colorWhite; + } + } + + &--secondary { + background-color: $colorWhite; + color: $colorBlack; + border: 3px solid $colorBlack; + + &:hover { + color: $colorBlack; + } + } + + &--tertiary { + padding-left: 0; + padding-right: 0; + } + + &--tertiary &__icon { + opacity: 0.5; + } + + &:first-child { + margin-left: 0; + } + + &__icon { + &:first-child { + margin-right: 0.5rem; + } + + &:last-child { + margin-left: 0.5rem; + } + } +} diff --git a/docs/src/components/Icon/style.scss b/docs/src/components/Icon/style.scss index 45d0ef45..44a905fe 100644 --- a/docs/src/components/Icon/style.scss +++ b/docs/src/components/Icon/style.scss @@ -1,7 +1,7 @@ .icon { display: inline-flex; - width: 1.2rem; - height: 1.2rem; + width: 1rem; + height: 1rem; &::v-deep > svg { width: 100%; diff --git a/docs/src/pages/index.vue b/docs/src/pages/index.vue index 605d81fa..146b329b 100644 --- a/docs/src/pages/index.vue +++ b/docs/src/pages/index.vue @@ -8,14 +8,19 @@

tiptap gives you full control about every single aspect of your text editor experience. It’s customizable, comes with a ton of extensions, is open-source, has an extensive documentation, and is simply a joy to use. Join our welcoming community and start building cool things! It’s free.

-

- +

+ Get Started - - + + View on GitHub - -

+
+
@@ -32,11 +37,11 @@

We don’t tell you what a menu should look like or where it should be rendered in the DOM. That’s why tiptap is headless and comes without any CSS. You are in full control over markup, styling and behaviour.

-

- +

+ Styling - -

+
+
@@ -48,11 +53,11 @@ React , Svelte and others.

-

- +

+ Installation - -

+
+
@@ -62,11 +67,11 @@

tiptap 2 is written in TypeScript. That helps us to find bugs early and gives you a nice autocomplete for the API (if your IDE supports that) on top of the extensive human written documentation.

-

- +

+ TypeScript - -

+
+
@@ -78,11 +83,11 @@ Y.js . Our production-grade setup requires less than 20 lines of code.

-

- +

+ Collaborative editing - -

+
+
@@ -126,11 +131,11 @@ </body> </html> -

- +

+ Learn More - -

+
+
@@ -186,11 +191,11 @@ to="https://www.scrumpy.io" /> --> -

- +

+ And Many More - -

+
+
@@ -216,6 +221,7 @@ import FeatureItem from '@/components/FeatureItem' import LogoList from '@/components/LogoList' import LogoItem from '@/components/LogoItem' import Prism from '~/components/Prism' +import Btn from '~/components/Btn' export default { components: { @@ -225,6 +231,7 @@ export default { LogoList, LogoItem, Prism, + Btn, }, metaInfo() {