mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 11:11:25 +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,25 +1,27 @@
|
|||
import { withKnobs, select, boolean, text } from '@storybook/addon-knobs';
|
||||
import Component from './ComboBox.Story.svelte';
|
||||
import { withKnobs, select, boolean, text } from "@storybook/addon-knobs";
|
||||
import Component from "./ComboBox.Story.svelte";
|
||||
|
||||
export default { title: 'ComboBox', decorators: [withKnobs] };
|
||||
export default { title: "ComboBox", decorators: [withKnobs] };
|
||||
|
||||
const sizes = {
|
||||
'Extra large size (xl)': 'xl',
|
||||
'Regular size (lg)': '',
|
||||
'Small size (sm)': 'sm'
|
||||
"Extra large size (xl)": "xl",
|
||||
"Regular size (lg)": "",
|
||||
"Small size (sm)": "sm",
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
size: select('Field size (size)', sizes, ''),
|
||||
placeholder: text('Placeholder text (placeholder)', 'Filter...'),
|
||||
titleText: text('Title (titleText)', 'Combobox title'),
|
||||
helperText: text('Helper text (helperText)', 'Optional helper text here'),
|
||||
light: boolean('Light (light)', false),
|
||||
disabled: boolean('Disabled (disabled)', false),
|
||||
invalid: boolean('Invalid (invalid)', false),
|
||||
invalidText: text('Invalid text (invalidText)', 'A valid value is required'),
|
||||
name: 'combo-box-name'
|
||||
}
|
||||
size: select("Field size (size)", sizes, ""),
|
||||
placeholder: text("Placeholder text (placeholder)", "Filter..."),
|
||||
titleText: text("Title (titleText)", "Combobox title"),
|
||||
light: boolean("Light (light)", false),
|
||||
disabled: boolean("Disabled (disabled)", false),
|
||||
invalid: boolean("Invalid (invalid)", false),
|
||||
invalidText: text(
|
||||
"Invalid text (invalidText)",
|
||||
"A valid value is required"
|
||||
),
|
||||
name: "combo-box-name",
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue