From 85d1e5010caabe0eedcb5cbdf9975b6770c30a44 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 13 Nov 2024 08:39:53 -0500 Subject: [PATCH] feat: card styles --- package.json | 1 + src/docs/examples/ButtonExamples.svelte | 14 ++--- src/lib/components/Card.svelte | 5 +- src/lib/components/Icon.svelte | 2 +- src/routes/+page.svelte | 12 ++--- src/routes/examples/[component]/+page.svelte | 54 ++++++++++++++------ tailwind.config.ts | 2 +- 7 files changed, 59 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 0e5b338..6b0ecc3 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "start": "npm run start:dev", "start:dev": "vite dev", + "watch": "vite build --watch", "build": "vite build && npm run package", "preview": "vite preview", "package": "npm run sync && svelte-package && publint", diff --git a/src/docs/examples/ButtonExamples.svelte b/src/docs/examples/ButtonExamples.svelte index 0e582b7..c7f1868 100644 --- a/src/docs/examples/ButtonExamples.svelte +++ b/src/docs/examples/ButtonExamples.svelte @@ -17,7 +17,7 @@ Shapes -
+
{#each shapes as shape} {/each} @@ -30,7 +30,7 @@ Colors -
+
{#each colors as color} {/each} @@ -43,7 +43,7 @@ Outline -
+
{#each colors as color} {/each} @@ -56,7 +56,7 @@ Ghost -
+
{#each colors as color} {/each} @@ -69,7 +69,7 @@ Hero -
+
{#each colors as color} {/each} @@ -82,7 +82,7 @@ Disabled -
+
{#each colors as color} {/each} @@ -95,7 +95,7 @@ Sizes -
+
{#each sizes as size}
diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index e61ff33..0b18c73 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -10,7 +10,10 @@
{@render children?.()} diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte index d1a3271..9db6fed 100644 --- a/src/lib/components/Icon.svelte +++ b/src/lib/components/Icon.svelte @@ -29,7 +29,7 @@ spin = false, role = 'img', ariaLabelledby, - strokeColor = 'currentColor', + strokeColor = 'transparent', strokeWidth = 2, ariaLabel = '', ariaHidden = false, diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3acf6fd..2c6afd5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,16 +2,16 @@ import { routes } from '$docs/routes.js'; -
-

@immich/ui

+
+ -
- -
+
{#each routes as route}

{route.name}

{/each}
-
+ diff --git a/src/routes/examples/[component]/+page.svelte b/src/routes/examples/[component]/+page.svelte index 25d72e8..d5bed86 100644 --- a/src/routes/examples/[component]/+page.svelte +++ b/src/routes/examples/[component]/+page.svelte @@ -1,29 +1,53 @@ -
+
-
- Home - > - - - {data.component} -
+ + + -
- {#if route} - {#each ['light', 'dark'] as theme} -
+ {#if route} +
+ {#each currentThemes as theme} +
+

{theme}

{/each} - {:else} +
+ {:else} +

No examples found for {data.component}

- {/if} -
+
+ {/if}
diff --git a/tailwind.config.ts b/tailwind.config.ts index 07fff71..3e823e7 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -2,7 +2,7 @@ import type { Config } from 'tailwindcss'; export default { content: ['./src/**/*.{html,js,svelte,ts}'], - + darkMode: 'class', theme: { extend: { colors: {