mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
c57d4c232a
* 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>
36 lines
608 B
Svelte
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"
|
|
}}
|
|
/>
|