forked from carbon-design-system/carbon-components-svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComboBox.test.svelte
52 lines (45 loc) · 903 Bytes
/
ComboBox.test.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script lang="ts">
import { ComboBox } from "../types";
import type { ComboBoxItem } from "../types/ComboBox/ComboBox";
const items: ComboBoxItem[] = [
{ id: "0", text: "Slack" },
{ id: "1", text: "Email" },
{ id: "2", text: "Fax" },
];
</script>
<ComboBox
direction="top"
titleText="Contact"
placeholder="Select contact method"
items="{items}"
/>
<ComboBox
titleText="Contact"
placeholder="Select contact method"
selectedIndex="{1}"
items="{items}"
/>
<ComboBox
light
titleText="Contact"
placeholder="Select contact method"
items="{items}"
/>
<ComboBox
titleText="Contact"
placeholder="Select contact method"
size="xl"
items="{items}"
/>
<ComboBox
titleText="Contact"
placeholder="Select contact method"
size="sm"
items="{items}"
/>
<ComboBox
disabled
titleText="Contact"
placeholder="Select contact method"
items="{items}"
/>