mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
933db53e93
* better handling of empty dataframe * add changeset * hide comments * add changeset * remove * lint * null case * add stories * stories * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
61 lines
1.1 KiB
Svelte
61 lines
1.1 KiB
Svelte
<script>
|
|
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", "swim", "jump"],
|
|
multiselect: false,
|
|
label: "Single-select Dropdown"
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Single-select Static"
|
|
args={{
|
|
value: "swim",
|
|
choices: ["run", "swim", "jump"],
|
|
multiselect: false,
|
|
disabled: true,
|
|
label: "Single-select Dropdown"
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Multiselect"
|
|
args={{
|
|
value: ["swim", "run"],
|
|
choices: ["run", "swim", "jump"],
|
|
label: "Multiselect Dropdown",
|
|
multiselect: true
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Multiselect Static"
|
|
args={{
|
|
value: ["swim", "run"],
|
|
choices: ["run", "swim", "jump"],
|
|
label: "Multiselect Dropdown",
|
|
multiselect: true,
|
|
disabled: true
|
|
}}
|
|
/>
|