diff --git a/src/lib/components/ui/button/Button.svelte b/src/lib/components/ui/button/Button.svelte new file mode 100644 index 0000000..368ea9d --- /dev/null +++ b/src/lib/components/ui/button/Button.svelte @@ -0,0 +1,52 @@ + + + + {@render children?.()} + diff --git a/src/lib/components/ui/button/button.variants.ts b/src/lib/components/ui/button/button.variants.ts new file mode 100644 index 0000000..7640694 --- /dev/null +++ b/src/lib/components/ui/button/button.variants.ts @@ -0,0 +1,30 @@ +export const COLOR_MAP = { + neutral: 'btn-neutral', + primary: 'btn-primary', + secondary: 'btn-secondary', + accent: 'btn-accent', + info: 'btn-info', + success: 'btn-success', + warning: 'btn-warning', + error: 'btn-error', +} as const; + +export const VARIANT_MAP = { + outline: 'btn-outline', + dash: 'btn-dash', + soft: 'btn-soft', + ghost: 'btn-ghost', + link: 'btn-link', +} as const; + +export const SIZE_MAP = { + xs: 'btn-xs', + sm: 'btn-sm', + md: 'btn-md', + lg: 'btn-lg', + xl: 'btn-xl', +} as const; + +export type Color = keyof typeof COLOR_MAP; +export type Variant = keyof typeof VARIANT_MAP; +export type Size = keyof typeof SIZE_MAP; diff --git a/src/lib/components/ui/button/index.ts b/src/lib/components/ui/button/index.ts new file mode 100644 index 0000000..ae34e39 --- /dev/null +++ b/src/lib/components/ui/button/index.ts @@ -0,0 +1 @@ +export { default as Button } from './Button.svelte';