mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(components): add RadioButton
This commit is contained in:
parent
acbb3ace96
commit
bf502f904f
7 changed files with 109 additions and 0 deletions
22
src/components/RadioButton/RadioButton.stories.js
Normal file
22
src/components/RadioButton/RadioButton.stories.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { withKnobs, text, select, boolean } from '@storybook/addon-knobs';
|
||||
import Component from './RadioButton.Story.svelte';
|
||||
|
||||
export default { title: 'Radio Button', decorators: [withKnobs] };
|
||||
|
||||
const labelPositions = {
|
||||
'Left (left)': 'left',
|
||||
'Right (right)': 'right'
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
name: text('Form item name (name)', 'test'),
|
||||
value: text('Value (value)', 'standard'),
|
||||
labelText: text('Label text (labelText)', 'Standard Radio Button'),
|
||||
labelPosition: select('Label position (labelPosition)', labelPositions, 'right'),
|
||||
disabled: boolean('Disabled (disabled)', false)
|
||||
}
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: 'skeleton' } });
|
Loading…
Add table
Add a link
Reference in a new issue