mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
Added example
This commit is contained in:
parent
23015c090b
commit
824d978419
1 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
<script>
|
||||
import { ComboBox } from "carbon-components-svelte";
|
||||
import { Button } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
let comboboxComponent
|
||||
|
||||
</script>
|
||||
|
||||
### Default
|
||||
|
@ -22,6 +25,17 @@ items={[
|
|||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Clear selection
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
bind:this={comboboxComponent}
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
<br>
|
||||
<Button on:click={comboboxComponent.clear}>Clear</Button>
|
||||
|
||||
### Multiple combo boxes
|
||||
|
||||
<FileSource src="/framed/ComboBox/MultipleComboBox" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue