diff --git a/src/docs/components/ComponentCard.svelte b/src/docs/components/ComponentCard.svelte index c00333b..16d135e 100644 --- a/src/docs/components/ComponentCard.svelte +++ b/src/docs/components/ComponentCard.svelte @@ -9,9 +9,15 @@ const { component }: Props = $props(); - diff --git a/src/docs/constants.ts b/src/docs/constants.ts index 13305c8..3f20256 100644 --- a/src/docs/constants.ts +++ b/src/docs/constants.ts @@ -1,4 +1,5 @@ import { + mdiAccountCircle, mdiAlertCircleOutline, mdiApplicationOutline, mdiButtonCursor, @@ -79,8 +80,9 @@ export const componentGroups = [ ], }, { - title: 'Immich', + title: 'Miscellaneous', components: [ + { name: 'Avatar', icon: mdiAccountCircle }, { name: 'Logo', icon: mdiImage }, { name: 'SupporterBadge', icon: mdiPartyPopper }, ], diff --git a/src/lib/components/Avatar/Avatar.svelte b/src/lib/components/Avatar/Avatar.svelte new file mode 100644 index 0000000..1e52020 --- /dev/null +++ b/src/lib/components/Avatar/Avatar.svelte @@ -0,0 +1,66 @@ + + +
+ {initials} +
diff --git a/src/lib/index.ts b/src/lib/index.ts index 24c12c8..9f223c8 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -2,6 +2,7 @@ export { default as Alert } from '$lib/components/Alert/Alert.svelte'; export { default as AppShell } from '$lib/components/AppShell/AppShell.svelte'; export { default as AppShellHeader } from '$lib/components/AppShell/AppShellHeader.svelte'; export { default as AppShellSidebar } from '$lib/components/AppShell/AppShellSidebar.svelte'; +export { default as Avatar } from '$lib/components/Avatar/Avatar.svelte'; export { default as Button } from '$lib/components/Button/Button.svelte'; export { default as Card } from '$lib/components/Card/Card.svelte'; export { default as CardBody } from '$lib/components/Card/CardBody.svelte'; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index cae1d92..3fd4fbc 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,7 +2,7 @@ import ComponentCard from '$docs/components/ComponentCard.svelte'; import Grid from '$docs/components/Grid.svelte'; import { componentGroups } from '$docs/constants.js'; - import { Heading, Link, Stack, Text } from '@immich/ui'; + import { Code, Heading, Link, Stack, Text } from '@immich/ui';
@@ -16,10 +16,7 @@ Install @immich/ui is published as an npm package. You can install it using npm. - -
- npm i --save-dev @immich/ui -
+ npm i --save-dev @immich/ui Components diff --git a/src/routes/components/alert/+page.svelte b/src/routes/components/alert/+page.svelte index 78181b4..1cefba9 100644 --- a/src/routes/components/alert/+page.svelte +++ b/src/routes/components/alert/+page.svelte @@ -9,7 +9,7 @@ const examples = [ { title: 'Basic', code: basicExample, component: BasicExample }, - { title: 'Colors', code: colorExample, component: ColorExample }, + { title: 'Color', code: colorExample, component: ColorExample }, { title: 'Custom Icon', code: customIconExample, component: CustomIconExample }, ]; diff --git a/src/routes/components/avatar/+page.svelte b/src/routes/components/avatar/+page.svelte new file mode 100644 index 0000000..0770e55 --- /dev/null +++ b/src/routes/components/avatar/+page.svelte @@ -0,0 +1,17 @@ + + + diff --git a/src/routes/components/avatar/BasicExample.svelte b/src/routes/components/avatar/BasicExample.svelte new file mode 100644 index 0000000..a38e656 --- /dev/null +++ b/src/routes/components/avatar/BasicExample.svelte @@ -0,0 +1,7 @@ + + + + + diff --git a/src/routes/components/avatar/ColorExample.svelte b/src/routes/components/avatar/ColorExample.svelte new file mode 100644 index 0000000..fc0e33b --- /dev/null +++ b/src/routes/components/avatar/ColorExample.svelte @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/routes/components/avatar/SizeExample.svelte b/src/routes/components/avatar/SizeExample.svelte new file mode 100644 index 0000000..5c24526 --- /dev/null +++ b/src/routes/components/avatar/SizeExample.svelte @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/src/routes/components/loading-spinner/+page.svelte b/src/routes/components/loading-spinner/+page.svelte index e37a19f..1daeea1 100644 --- a/src/routes/components/loading-spinner/+page.svelte +++ b/src/routes/components/loading-spinner/+page.svelte @@ -7,7 +7,7 @@ const examples = [ { title: 'Sizes', code: sizeExample, component: SizeExample }, - { title: 'Colors', code: colorExample, component: ColorExample }, + { title: 'Color', code: colorExample, component: ColorExample }, ]; diff --git a/src/routes/components/switch/+page.svelte b/src/routes/components/switch/+page.svelte index 814de4e..fc7f877 100644 --- a/src/routes/components/switch/+page.svelte +++ b/src/routes/components/switch/+page.svelte @@ -10,7 +10,7 @@ const examples = [ { title: 'Basic', code: basicExample, component: BasicExample }, - { title: 'Colors', code: colorExample, component: ColorExample }, + { title: 'Color', code: colorExample, component: ColorExample }, { title: 'Form', code: formExample, component: FormExample }, ];