mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
a5e98de4a7
commit
925bfba548
11 changed files with 7242 additions and 0 deletions
16
palimpsest/src/components/ThemePicker.svelte
Normal file
16
palimpsest/src/components/ThemePicker.svelte
Normal file
|
@ -0,0 +1,16 @@
|
|||
<script>
|
||||
import { Select, SelectItem } from 'carbon-components-svelte';
|
||||
|
||||
let selected = 'white';
|
||||
|
||||
$: {
|
||||
document.documentElement.setAttribute('carbon-theme', selected);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Select inline labelText="Select Carbon Theme" bind:selected>
|
||||
<SelectItem value="white" text="White (light)" />
|
||||
<SelectItem value="g10" text="Gray 10 (light)" />
|
||||
<SelectItem value="g90" text="Gray 90 (dark)" />
|
||||
<SelectItem value="g100" text="Gray 100 (dark)" />
|
||||
</Select>
|
Loading…
Add table
Add a link
Reference in a new issue