mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
docs: Checkbox, Tabs, NumberInput (#1045)
* add `Checkbox` reactive example for `bind:checked` (#967) * update `Checkbox` reactive example for `bind:group` to demo two-way binding * simplify `Tabs` reactive example * add `NumberInput` "No value" example
This commit is contained in:
parent
9e915cf90a
commit
4e3415a4e9
6 changed files with 65 additions and 27 deletions
|
@ -15,22 +15,9 @@
|
|||
</svelte:fragment>
|
||||
</Tabs>
|
||||
|
||||
<div>
|
||||
<h4>Selected index: {selected}</h4>
|
||||
<div style="margin: var(--cds-layout-01) 0">
|
||||
<Button on:click="{() => (selected = 1)}">Set index to 1</Button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Button
|
||||
size="small"
|
||||
disabled="{selected === 1}"
|
||||
on:click="{() => (selected = 1)}"
|
||||
>
|
||||
Set index to 1
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
margin-top: var(--cds-spacing-05);
|
||||
}
|
||||
</style>
|
||||
<strong>Selected index:</strong>
|
||||
{selected}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue