mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
docs(palimpsest): support responsive design
This commit is contained in:
parent
2ac885c32e
commit
01f65cb308
10 changed files with 338 additions and 28 deletions
|
@ -1,16 +1,21 @@
|
|||
<script>
|
||||
export let inline = false;
|
||||
|
||||
import { Select, SelectItem } from 'carbon-components-svelte';
|
||||
import { theme } from '../store';
|
||||
|
||||
let selected = 'g10';
|
||||
|
||||
$: {
|
||||
theme.set(selected);
|
||||
document.documentElement.setAttribute('carbon-theme', selected);
|
||||
document.documentElement.setAttribute('carbon-theme', $theme);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Select inline labelText="Theme" bind:selected>
|
||||
<Select
|
||||
{inline}
|
||||
labelText="Theme"
|
||||
selected={$theme}
|
||||
on:change={({ detail }) => {
|
||||
theme.set(detail);
|
||||
}}>
|
||||
<SelectItem value="white" text="White" />
|
||||
<SelectItem value="g10" text="Gray 10" />
|
||||
<SelectItem value="g90" text="Gray 90" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue