mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
b8c2a105a5
commit
4ba8df4425
9 changed files with 331 additions and 0 deletions
45
src/components/Tabs/Tabs.stories.js
Normal file
45
src/components/Tabs/Tabs.stories.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
import { withKnobs, boolean, number, text } from '@storybook/addon-knobs';
|
||||
import Component from './Tabs.Story.svelte';
|
||||
|
||||
export default { title: 'Tabs', decorators: [withKnobs] };
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
tabProps: {
|
||||
disabled: boolean('Disabled (disabled in <Tab>)', false),
|
||||
href: text('The href for tab (href in <Tab>)', '#'),
|
||||
role: text('ARIA role (role in <Tab>)', 'presentation'),
|
||||
tabindex: number('Tab index (tabindex in <Tab>)', 0)
|
||||
},
|
||||
tabsProps: {
|
||||
className: 'some-class',
|
||||
selected: number('The index of the selected tab (selected in <Tabs>)', 1),
|
||||
triggerHref: text('The href of trigger button for narrow mode (triggerHref in <Tabs>)', '#'),
|
||||
role: text('ARIA role (role in <Tabs>)', 'navigation'),
|
||||
iconDescription: text(
|
||||
'The description of the trigger icon for narrow mode (iconDescription in <Tabs>)',
|
||||
'show menu options'
|
||||
),
|
||||
tabContentClassName: text(
|
||||
'The className for the child `<TabContent>` components',
|
||||
'tab-content'
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const Container = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: 'container',
|
||||
tabProps: {
|
||||
disabled: boolean('Disabled (disabled in <Tab>)', false),
|
||||
href: text('The href for tab (href in <Tab>)', '#'),
|
||||
role: text('ARIA role (role in <Tab>)', 'presentation'),
|
||||
tabindex: number('Tab index (tabindex in <Tab>)', 0)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: 'skeleton' } });
|
Loading…
Add table
Add a link
Reference in a new issue