gradio/js/slider/Slider.stories.svelte
Dmytro Drach f7df92f3f3
Improve UX of non-interactive slider (#7814)
* Fix disabled slider appearance

* add changeset

* tweaks

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-03-25 15:10:10 +00:00

50 lines
687 B
Svelte

<script>
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
import Slider from "./Index.svelte";
</script>
<Meta title="Components/Slider" component={Slider} />
<Template let:args>
<Slider interactive={true} {...args} />
</Template>
<Story
name="Slider with min and max"
args={{
minimum: 0,
maximum: 100
}}
/>
<Story
name="Slider with step of 10"
args={{
step: 10
}}
/>
<Story
name="Slider with hidden label"
args={{
show_label: false
}}
/>
<Story
name="Slider with min, max, and default value"
args={{
value: 50,
minimum: 0,
maximum: 100
}}
/>
<Story
name="Non-interactive Slider"
args={{
value: 30,
interactive: false
}}
/>