diff --git a/src/stories/Link.stories.ts b/src/stories/Link.stories.ts new file mode 100644 index 0000000..732d526 --- /dev/null +++ b/src/stories/Link.stories.ts @@ -0,0 +1,26 @@ +import type { Meta, StoryObj } from '@storybook/vue3' +import Link from '@/stories/Link.vue' + +const meta: Meta = { + component: Link +} + +export default meta; + +type Story = StoryObj + +export const Internal: Story = { + args: { + text: "Lien", + url: '#', + target: '_self' + } +} + +export const NewTab: Story = { + args: { + text: "Lien dans un nouvel onglet", + url: '#', + target: "_blank" + } +} diff --git a/src/stories/Link.vue b/src/stories/Link.vue new file mode 100644 index 0000000..57c90f5 --- /dev/null +++ b/src/stories/Link.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/stories/link.css b/src/stories/link.css new file mode 100644 index 0000000..db1839a --- /dev/null +++ b/src/stories/link.css @@ -0,0 +1,22 @@ +.storybook-link{ + color: var(--color-link-text-default); +} + +.storybook-link:hover{ + color: var(--color-link-text-hover); + background: var(--color-link-background-hover); +} + +.storybook-link:visited{ + color: var(--color-link-text-visited); +} + +.storybook-link:active{ + color: var(--color-link-text-pressed); +} + +.storybook-link--external{ + &::after{ + content: ' \2750'; + } +} diff --git a/src/tokens/colors.css b/src/tokens/colors.css index 96ca65d..a4e6a36 100644 --- a/src/tokens/colors.css +++ b/src/tokens/colors.css @@ -24,6 +24,9 @@ --color-cyan-100: #D2F4F8FF; --color-cyan-050: #E9FAFCFF; + /*GREEN*/ + --color-green-700: #1E8549FF; + /*NAVY*/ --color-navy-900: #000018FF; --color-navy-800: #000031FF; @@ -106,6 +109,12 @@ --color-button-background-destructive-subtle-active:var(--color-white-900); --color-button-text-destructive-subtle-disabled: var(--color-white-300); + --color-link-text-default: var(--color-navy-500); + --color-link-text-hover: var(--color-navy-700); + --color-link-background-hover: var(--color-navy-050); + --color-link-text-pressed: var(--color-navy-700); + --color-link-text-visited: var(--color-green-700); + }