Skip to content

Commit 59e67f7

Browse files
committed
Use shared code for demo pages
1 parent 6840bac commit 59e67f7

38 files changed

+484
-1018
lines changed

.changeset/shiny-poems-own.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@sjsf/flowbite-icons": patch
3+
"@sjsf/flowbite-theme": patch
4+
"@sjsf/skeleton-theme": patch
5+
"@sjsf/daisyui-theme": patch
6+
"@sjsf/lucide-icons": patch
7+
"@sjsf/shadcn-theme": patch
8+
"testing": patch
9+
---
10+
11+
Use shared code for demo pages

mkfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ shad/:
105105
pnpm run dev
106106
popd
107107

108+
ts/:
109+
pushd packages/testing
110+
b:
111+
pnpm run build
112+
popd
113+
108114
p:
109115
pnpm run preview
110116

packages/daisyui-theme/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"svelte": "catalog:",
7474
"svelte-check": "catalog:",
7575
"tailwindcss": "catalog:",
76+
"testing": "workspace:*",
7677
"typescript-eslint": "catalog:",
7778
"vite": "catalog:",
7879
"vitest": "catalog:"

packages/daisyui-theme/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="en" data-theme="light">
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<script lang="ts">
2+
import { ComponentsAndWidgets } from 'testing/demo'
3+
24
import '../app.css';
35
import { theme } from '../lib/index.js';
46
5-
import WidgetsForm from './widgets.svelte';
6-
import ComponentsForm from './components.svelte';
77
</script>
88

9-
<div class="flex gap-8 p-8">
10-
<WidgetsForm class="flex flex-1 flex-col gap-4" {theme} />
11-
<ComponentsForm class="flex flex-1 flex-col gap-4" {theme} />
12-
</div>
9+
<ComponentsAndWidgets {theme} />

packages/daisyui-theme/src/routes/components.svelte

Lines changed: 0 additions & 76 deletions
This file was deleted.

packages/daisyui-theme/src/routes/widgets.svelte

Lines changed: 0 additions & 150 deletions
This file was deleted.

packages/flowbite-icons/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"svelte": "catalog:",
7373
"svelte-check": "catalog:",
7474
"tailwindcss": "catalog:",
75+
"testing": "workspace:*",
7576
"typescript-eslint": "catalog:",
7677
"vite": "catalog:",
7778
"vitest": "catalog:"
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
<script lang="ts">
2-
import type { Snippet } from 'svelte';
3-
2+
import { AllIcons } from 'testing/demo';
3+
4+
import '../app.css';
45
import { icons } from '../lib';
5-
import "../app.css"
66
</script>
77

8-
<div
9-
style="height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center"
10-
>
11-
<div style="display: flex; flex-direction: column; gap: 1rem">
12-
{#each Object.entries(icons) as [key, icon]}
13-
<button style="display: flex; gap: 0.5rem; align-items: center; height: 2rem">
14-
{@render (icon as Snippet)()}
15-
{key}
16-
</button>
17-
{/each}
18-
</div>
19-
</div>
20-
8+
<AllIcons {icons} />

packages/flowbite-theme/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"svelte": "catalog:",
7777
"svelte-check": "catalog:",
7878
"tailwindcss": "catalog:",
79+
"testing": "workspace:*",
7980
"typescript-eslint": "catalog:",
8081
"vite": "catalog:",
8182
"vitest": "catalog:"

0 commit comments

Comments
 (0)