mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
test: add TS types
This commit is contained in:
parent
302e82d6a2
commit
eed617433b
126 changed files with 3378 additions and 226 deletions
68
tests/MultiSelect.test.svelte
Normal file
68
tests/MultiSelect.test.svelte
Normal file
|
@ -0,0 +1,68 @@
|
|||
<script lang="ts">
|
||||
import { MultiSelect } from "../types";
|
||||
</script>
|
||||
|
||||
<MultiSelect
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
sortItem="{() => {}}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
selectedIds="{['0', '1']}"
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
itemToString="{(item) => {
|
||||
return item.text + ' (' + item.id + ')';
|
||||
}}"
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
sortItem="{() => {}}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
light
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
type="inline"
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
size="xl"
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
size="sm"
|
||||
titleText="Contact"
|
||||
label="Select contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
||||
|
||||
<MultiSelect
|
||||
filterable
|
||||
titleText="Contact"
|
||||
placeholder="Filter contact methods..."
|
||||
items="{[{ id: '0', text: 'Slack' }, { id: '1', text: 'Email' }, { id: '2', text: 'Fax' }]}"
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue