Skip to content

Commit

Permalink
chore: added radio example with 2 radios
Browse files Browse the repository at this point in the history
  • Loading branch information
mwargan committed Apr 11, 2024
1 parent aceb658 commit a96316a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/stories/Inputs/Radio.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,22 @@ export default meta;
type Story = StoryObj<HTMLInputElementCustom>;

export const Default: Story = {};

export const MultiOptions: Story = {
render: (args) => ({
setup() {
return { args };
},
// We need to render the radio with options from args - here we show 2 radios
template: `
<label for='radio'>
<input id='radio' type='radio' data-testid="input" v-bind='args' name='{{args.name}}'></input>
{{args.value}}
</label>
<label for='radio2'>
<input id='radio2' type='radio' data-testid="input" v-bind='args' name='{{args.name}}'></input>
{{args.value}}
</label>
`,
}),
};

0 comments on commit a96316a

Please sign in to comment.