mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 20:59:20 +00:00
docs(tabs): simplify reactive example
This commit is contained in:
parent
3a75244e34
commit
1a1f4a32b2
1 changed files with 4 additions and 17 deletions
|
@ -15,22 +15,9 @@
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<div>
|
<div style="margin: var(--cds-layout-01) 0">
|
||||||
<h4>Selected index: {selected}</h4>
|
<Button on:click="{() => (selected = 1)}">Set index to 1</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<strong>Selected index:</strong>
|
||||||
<Button
|
{selected}
|
||||||
size="small"
|
|
||||||
disabled="{selected === 1}"
|
|
||||||
on:click="{() => (selected = 1)}"
|
|
||||||
>
|
|
||||||
Set index to 1
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
margin-top: var(--cds-spacing-05);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue