mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
refactor: use $$restProps API
- add ref prop for applicable components (#196) - add slot to Content Switcher `Switch` component (#183) - remove fillArray, css utilities
This commit is contained in:
parent
4e2959080b
commit
e886d772c7
288 changed files with 4681 additions and 4498 deletions
|
@ -1,35 +1,35 @@
|
|||
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
|
||||
import Component from './ToggleSmall.Story.svelte';
|
||||
import { withKnobs, boolean, text } from "@storybook/addon-knobs";
|
||||
import Component from "./ToggleSmall.Story.svelte";
|
||||
|
||||
export default { title: 'ToggleSmall', decorators: [withKnobs] };
|
||||
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),
|
||||
id: text('ToggleSmall id', 'toggle-small-id'),
|
||||
name: text('ToggleSmall name', 'toggle-small-name')
|
||||
}
|
||||
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),
|
||||
id: text("ToggleSmall id", "toggle-small-id"),
|
||||
name: text("ToggleSmall name", "toggle-small-name"),
|
||||
},
|
||||
});
|
||||
|
||||
Default.story = { name: 'Default (untoggled)' };
|
||||
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),
|
||||
id: text('ToggleSmall id', 'toggle-small-id'),
|
||||
name: text('ToggleSmall name', 'toggle-small-name')
|
||||
}
|
||||
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),
|
||||
id: text("ToggleSmall id", "toggle-small-id"),
|
||||
name: text("ToggleSmall name", "toggle-small-name"),
|
||||
},
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: 'skeleton' } });
|
||||
export const Skeleton = () => ({ Component, props: { story: "skeleton" } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue