gradio/js/radio/Radio.stories.svelte
Abubakar Abid c57d4c232a
gr.Radio and gr.CheckboxGroup can now accept different names and values (#5232)
* radio

* radio checkboxgroup

* add changeset

* type

* fix tests

* types

* fix unit test

* Update gradio/components/radio.py

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update gradio/components/checkboxgroup.py

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* fix review

* examples

* backend

* type fixes

* fix test

* fixed example

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-08-16 11:27:39 -07:00

36 lines
608 B
Svelte

<script>
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
import Radio from "./shared/Radio.svelte";
</script>
<Meta
title="Components/Radio"
component={Radio}
argTypes={{
disabled: {
control: [true, false],
description: "Whether the radio is disabled",
name: "interactive",
value: false
}
}}
/>
<Template let:args>
<Radio {...args} />
</Template>
<Story
name="Radio with Different Names and Values"
args={{
value: "jump again",
choices: [
["run", "run"],
["swim", "swim"],
["jump", "jump"],
["jump", "jump again"]
],
label: "Radio"
}}
/>