mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
49 lines
868 B
Svelte
49 lines
868 B
Svelte
<script>
|
|
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
|
|
import Multiselect from "./shared/Multiselect.svelte";
|
|
import { format } from "svelte-i18n";
|
|
import { get } from "svelte/store";
|
|
</script>
|
|
|
|
<Meta
|
|
title="Components/Multiselect"
|
|
component={Multiselect}
|
|
argTypes={{
|
|
multiselect: {
|
|
control: [true, false],
|
|
name: "multiselect",
|
|
value: false
|
|
}
|
|
}}
|
|
/>
|
|
|
|
<Template let:args>
|
|
<Multiselect {...args} i18n={get(format)} />
|
|
</Template>
|
|
|
|
<Story
|
|
name="Multiselect Interactive"
|
|
args={{
|
|
value: ["swim", "run"],
|
|
choices: [
|
|
["run", "run"],
|
|
["swim", "swim"],
|
|
["jump", "jump"]
|
|
],
|
|
label: "Multiselect Dropdown"
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Multiselect Static"
|
|
args={{
|
|
value: ["swim", "run"],
|
|
choices: [
|
|
["run", "run"],
|
|
["swim", "swim"],
|
|
["jump", "jump"]
|
|
],
|
|
label: "Multiselect Dropdown",
|
|
disabled: true
|
|
}}
|
|
/>
|