mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 11:11:25 +00:00
parent
4f73b8b71a
commit
6c75c8a973
9 changed files with 243 additions and 0 deletions
36
src/components/Select/Select.stories.js
Normal file
36
src/components/Select/Select.stories.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
import { withKnobs, text, boolean } from '@storybook/addon-knobs';
|
||||
import Component from './Select.Story.svelte';
|
||||
|
||||
export default { title: 'Select', decorators: [withKnobs] };
|
||||
|
||||
const labelPositions = {
|
||||
'Left (left)': 'left',
|
||||
'Right (right)': 'right'
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
select: {
|
||||
light: boolean('Light variant (light in <Select>)', false),
|
||||
inline: boolean('Put control in-line with label (inline in <Select>)', false),
|
||||
disabled: boolean('Disabled (disabled in <Select>)', false),
|
||||
hideLabel: boolean('No label (hideLabel in <Select>)', false),
|
||||
invalid: boolean('Show form validation UI (invalid in <Select>)', false),
|
||||
invalidText: text(
|
||||
'Form validation UI content (invalidText in <Select>)',
|
||||
'A valid value is required'
|
||||
),
|
||||
labelText: text('Label text (helperText)', 'Select'),
|
||||
helperText: text('Helper text (helperText)', 'Optional helper text.')
|
||||
},
|
||||
group: {
|
||||
disabled: boolean('Disabled (disabled in <SelectItemGroup>)', false)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({
|
||||
Component,
|
||||
props: { story: 'skeleton', hideLabel: boolean('No label (hideLabel in <Select>)', false) }
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue