mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
See [@carbon/layout](https://github.com/carbon-design-system/carbon/blob/main/docs/migration/v11.md#carbonlayout) migration guide: $layout-01 Removed, use $spacing-05 instead $layout-02 Removed, use $spacing-06 instead $layout-03 Removed, use $spacing-07 instead $layout-04 Removed, use $spacing-09 instead $layout-05 Removed, use $spacing-10 instead $layout-06 Removed, use $spacing-12 instead $layout-07 Removed, use $spacing-13 instead
21 lines
596 B
Svelte
21 lines
596 B
Svelte
<script>
|
|
import { Select, SelectItem, Button } from "carbon-components-svelte";
|
|
|
|
let selected = "g10";
|
|
</script>
|
|
|
|
<Select labelText="Carbon theme" bind:selected>
|
|
<SelectItem value="white" text="White" />
|
|
<SelectItem value="g10" text="Gray 10" />
|
|
<SelectItem value="g80" text="Gray 80" />
|
|
<SelectItem value="g90" text="Gray 90" />
|
|
<SelectItem value="g100" text="Gray 100" />
|
|
</Select>
|
|
|
|
<div style="margin: var(--bx-spacing-05) 0">
|
|
Selected: <strong>{selected}</strong>
|
|
</div>
|
|
|
|
<Button disabled="{selected === 'g90'}" on:click="{() => (selected = 'g90')}">
|
|
Set to "g90"
|
|
</Button>
|