diff --git a/src/lib/components/chip/Chip.svelte b/src/lib/components/chip/Chip.svelte index 0a3ccd33..72bc3052 100644 --- a/src/lib/components/chip/Chip.svelte +++ b/src/lib/components/chip/Chip.svelte @@ -52,4 +52,5 @@ + diff --git a/src/routes/chip/+page.svelte b/src/routes/chip/+page.svelte index 634d7b9b..ef000200 100644 --- a/src/routes/chip/+page.svelte +++ b/src/routes/chip/+page.svelte @@ -1,11 +1,14 @@ - + Chip @@ -31,15 +34,15 @@ Castor Troy - - - Castor Troy - +
+
+ +
- + Chip with Close @@ -53,6 +56,27 @@ Castor Troy + +
+
+ +
+ + + + + + + + + + + + + + + + diff --git a/src/routes/chip/examples.ts b/src/routes/chip/examples.ts new file mode 100644 index 00000000..34c091e3 --- /dev/null +++ b/src/routes/chip/examples.ts @@ -0,0 +1,105 @@ +import type { Slot, Prop } from '../../docs'; + +export const props: Prop[] = [ + { + id: '1', + prop: 'type', + type: "'info' | 'warn' | 'success' | 'error' | 'default'", + default: 'default' + }, + { + id: '2', + prop: 'type', + type: "'xs' | 'sm' | 'md' | 'lg' | 'xl'", + default: 'md' + } +]; + +export const slots: Slot[] = [ + { + id: '1', + slot: 'avatar', + component: '' + }, + { + id: '2', + slot: 'label', + component: '' + }, + { + id: '3', + slot: 'close', + component: '' + }, + { + id: '4', + slot: 'default', + component: '' + } +]; + +export const avatarProps: Prop[] = [ + { + id: '1', + prop: 'src', + type: 'string', + default: '' + }, + { + id: '2', + prop: 'alt', + type: 'string', + default: 'user-avatar' + } +]; + +export const labelSlots: Slot[] = [ + { + id: '1', + slot: 'default', + component: '' + } +]; + +export const example = ` + + + + + Castor Troy + + + + Castor Troy + + + + + Castor Troy + + + + Castor Troy + + + + Castor Troy +`; + +export const closeExample = ` + + + + + Castor Troy + + + + + Castor Troy + +`;