File size: 1,024 Bytes
0ad74ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
53
54
55
56
57
58
59
60
61
62
<script lang="ts">
	import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
	import Dropdown from "./shared/Dropdown.svelte";
</script>

<Meta
	title="Components/Dropdown"
	component={Dropdown}
	argTypes={{
		multiselect: {
			control: [true, false],
			description: "Whether to autoplay the video on load",
			name: "multiselect",
			value: false
		}
	}}
/>

<Template let:args>
	<Dropdown {...args} />
</Template>

<Story
	name="Single-select"
	args={{
		value: "swim",
		choices: [
			["run", "run"],
			["swim", "swim"],
			["jump", "jump"]
		],
		label: "Single-select Dropdown",
		info: "This is a single-select dropdown"
	}}
/>
<Story
	name="Single-select Static"
	args={{
		value: "swim",
		choices: [
			["run", "run"],
			["swim", "swim"],
			["jump", "jump"]
		],
		disabled: true,
		label: "Single-select Dropdown"
	}}
/>

<Story
	name="Empty initial value"
	args={{
		interactive: true,
		choices: [
			["run", "run"],
			["swim", "swim"],
			["jump", "jump"]
		],
		label: "Empty Dropdown"
	}}
/>