mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
feat: initial commit
This commit is contained in:
parent
bde7dd644f
commit
72dc38ea56
119 changed files with 14925 additions and 1 deletions
31
src/components/ToggleSmall/ToggleSmall.stories.js
Normal file
31
src/components/ToggleSmall/ToggleSmall.stories.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
|
||||
import Component from './ToggleSmall.Story.svelte';
|
||||
|
||||
export default { title: 'ToggleSmall', decorators: [withKnobs] };
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
labelText: text('Label toggle input control (labelText)', ''),
|
||||
'aria-label': text('ARIA label of the toggle (aria-label)', ''),
|
||||
labelA: text('Label for untoggled state (labelA)', 'Off'),
|
||||
labelB: text('Label for toggled state (labelB)', 'On'),
|
||||
disabled: boolean('Disabled (disabled)', false)
|
||||
}
|
||||
});
|
||||
|
||||
Default.story = { name: 'Default (untoggled)' };
|
||||
|
||||
export const Toggled = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: 'toggled',
|
||||
labelText: text('Label toggle input control (labelText)', ''),
|
||||
'aria-label': text('ARIA label of the toggle (aria-label)', ''),
|
||||
labelA: text('Label for untoggled state (labelA)', 'Off'),
|
||||
labelB: text('Label for toggled state (labelB)', 'On'),
|
||||
disabled: boolean('Disabled (disabled)', false)
|
||||
}
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: 'skeleton' } });
|
Loading…
Add table
Add a link
Reference in a new issue