-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ThemeSelect] Use simplified menu when single light/dark themes are u…
…sed, and show current scheme (light/dark) as icon
- Loading branch information
Showing
4 changed files
with
156 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte-ux': patch | ||
--- | ||
|
||
[ThemeSelect] Use simplified menu when single light/dark themes are used |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte-ux': patch | ||
--- | ||
|
||
[ThemeSelect] Show current scheme (light/dark) as icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 16 additions & 2 deletions
18
packages/svelte-ux/src/routes/docs/components/ThemeSelect/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
<script lang="ts"> | ||
import Preview from '$lib/components/Preview.svelte'; | ||
import ThemeSelect from '$lib/components/ThemeSelect.svelte'; | ||
export let data; | ||
</script> | ||
|
||
<h1>Examples</h1> | ||
|
||
<h2>Default</h2> | ||
|
||
<h2>Default (based on settings)</h2> | ||
<Preview> | ||
<ThemeSelect /> | ||
</Preview> | ||
|
||
<h2>Single light/dark theme</h2> | ||
|
||
<Preview> | ||
<ThemeSelect lightThemes={['light']} darkThemes={['dark']} /> | ||
</Preview> | ||
|
||
<h2>Multiple light/dark themes</h2> | ||
|
||
<Preview> | ||
<!-- Use docs themes for convenience of many themes --> | ||
<ThemeSelect lightThemes={data.themes.light} darkThemes={data.themes.dark} /> | ||
</Preview> |