mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-09 02:00:44 +08:00
ddc02268f7
* dropdown * changes * add changeset * refactor * cleanup * dropdown * more refactoring * fixes * simplify, docstring * restore active_index * split into two files * new files * simplify * single select dropdown working * single select dropdown almost working * dropdown * multiselect * multiselect wip * multiselect * multiselect * multiselect * interactive working * dropdown * lint * add changeset * type * typing * fix multiselect static * dropdown * stories and tests * split stories * lint * add changeset * revert * add changeset * fix x * dropdown * lint, test * backend fixes * lint * fix tests * lint * fix final test * clean * review fixes * dropdown * lint * lint * changes * typing * fixes * active index null bug --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
47 lines
761 B
Svelte
47 lines
761 B
Svelte
<script>
|
|
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
|
|
import Multiselect from "./shared/Multiselect.svelte";
|
|
</script>
|
|
|
|
<Meta
|
|
title="Components/Multiselect"
|
|
component={Multiselect}
|
|
argTypes={{
|
|
multiselect: {
|
|
control: [true, false],
|
|
name: "multiselect",
|
|
value: false
|
|
}
|
|
}}
|
|
/>
|
|
|
|
<Template let:args>
|
|
<Multiselect {...args} />
|
|
</Template>
|
|
|
|
<Story
|
|
name="Multiselect"
|
|
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
|
|
}}
|
|
/>
|