From ed8c23f9fed4377c6e0cd608e8be2ca0b245c2c2 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Tue, 28 Mar 2023 11:21:14 +0200 Subject: [PATCH] Introduce a reusable button --- src/lib/components/Button.svelte | 75 ++++++++++++++++++++++++++++++++ src/lib/components/index.ts | 1 + src/stories/Button.stories.ts | 60 +++++++++++++++++++------ 3 files changed, 123 insertions(+), 13 deletions(-) create mode 100644 src/lib/components/Button.svelte diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte new file mode 100644 index 000000000..ed059aab5 --- /dev/null +++ b/src/lib/components/Button.svelte @@ -0,0 +1,75 @@ + + + + + + + diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index 8474d9f73..ad5d06a08 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -4,3 +4,4 @@ export { default as Breadcrumbs } from './Breadcrumbs.svelte'; export { default as CodeViewer } from './CodeViewer'; export { default as CommandPalette } from './CommandPalette'; export { default as Modal } from './Modal.svelte'; +export { default as Button } from './Button.svelte'; diff --git a/src/stories/Button.stories.ts b/src/stories/Button.stories.ts index 9abf4d88d..41fb49446 100644 --- a/src/stories/Button.stories.ts +++ b/src/stories/Button.stories.ts @@ -1,18 +1,17 @@ import type { Meta, StoryObj } from '@storybook/svelte'; -import Button from './Button.svelte'; +import Button from '$lib/components/Button.svelte'; // More on how to set up stories at: https://storybook.js.org/docs/7.0/svelte/writing-stories/introduction const meta: Meta