From 251c2b23e7989269a6be18dcf24a0b93e7492fb1 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Tue, 17 Dec 2024 23:29:43 -0500 Subject: [PATCH] daisy buttons --- src/lib/components/Button.stories.svelte | 33 +++++++--- src/lib/components/Button.svelte | 79 ++++++++++++------------ src/lib/types/daisy-colors.ts | 12 ++++ src/lib/types/daisy-sizes.ts | 1 + src/lib/types/index.ts | 2 + src/routes/login/+page.svelte | 9 +-- 6 files changed, 82 insertions(+), 54 deletions(-) create mode 100644 src/lib/types/daisy-colors.ts create mode 100644 src/lib/types/daisy-sizes.ts create mode 100644 src/lib/types/index.ts diff --git a/src/lib/components/Button.stories.svelte b/src/lib/components/Button.stories.svelte index 9403409..aca9dd1 100644 --- a/src/lib/components/Button.stories.svelte +++ b/src/lib/components/Button.stories.svelte @@ -11,20 +11,35 @@ onClick: fn() }, argTypes: { + color: { + control: 'select', + options: [ + 'neutral', + 'primary', + 'secondary', + 'accent', + 'ghost', + 'link', + 'info', + 'success', + 'warning', + 'error' + ] + }, + outline: { + control: 'boolean' + }, size: { control: 'select', - options: ['small', 'normal', 'large'], - defaultValue: 'normal' + options: ['Default', 'xs', 'sm', 'lg'], + defaultValue: 'Default' }, - backgroundColor: { - control: 'color' - }, - primary: { - control: 'boolean', - defaultValue: true + type: { + control: 'select', + options: ['button', 'reset', 'submit'] } } }); - \ No newline at end of file + \ No newline at end of file diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index 2c8737a..9859e56 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -1,51 +1,54 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/lib/types/daisy-colors.ts b/src/lib/types/daisy-colors.ts new file mode 100644 index 0000000..c5d5a56 --- /dev/null +++ b/src/lib/types/daisy-colors.ts @@ -0,0 +1,12 @@ +export type DaisyColor = + | 'default' + | 'neutral' + | 'primary' + | 'secondary' + | 'accent' + | 'ghost' + | 'link' + | 'info' + | 'success' + | 'warning' + | 'error'; \ No newline at end of file diff --git a/src/lib/types/daisy-sizes.ts b/src/lib/types/daisy-sizes.ts new file mode 100644 index 0000000..9cd1207 --- /dev/null +++ b/src/lib/types/daisy-sizes.ts @@ -0,0 +1 @@ +export type DaisySize = 'xs' | 'sm' | 'lg'; \ No newline at end of file diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts new file mode 100644 index 0000000..93ffa73 --- /dev/null +++ b/src/lib/types/index.ts @@ -0,0 +1,2 @@ +export * from './daisy-colors'; +export * from './daisy-sizes'; \ No newline at end of file diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte index 98c37c2..4ce03a1 100644 --- a/src/routes/login/+page.svelte +++ b/src/routes/login/+page.svelte @@ -24,13 +24,8 @@
-