mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 19:21:26 +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,27 +1,27 @@
|
|||
import { withKnobs, select, boolean, text } from '@storybook/addon-knobs';
|
||||
import Component from './Search.Story.svelte';
|
||||
import { withKnobs, select, boolean, text } from "@storybook/addon-knobs";
|
||||
import Component from "./Search.Story.svelte";
|
||||
|
||||
export default { title: 'Search', decorators: [withKnobs] };
|
||||
export default { title: "Search", decorators: [withKnobs] };
|
||||
|
||||
const sizes = {
|
||||
'Regular size (xl)': 'xl',
|
||||
'Large size (lg)': 'lg',
|
||||
'Small size (sm)': 'sm'
|
||||
"Regular size (xl)": "xl",
|
||||
"Large size (lg)": "lg",
|
||||
"Small size (sm)": "sm",
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
size: select('Size (size)', sizes, 'xl'),
|
||||
light: boolean('Light variant (light)', false),
|
||||
name: text('Form item name (name)', ''),
|
||||
labelText: text('Label text (labelText)', 'Search'),
|
||||
size: select("Size (size)", sizes, "xl"),
|
||||
light: boolean("Light variant (light)", false),
|
||||
name: text("Form item name (name)", ""),
|
||||
labelText: text("Label text (labelText)", "Search"),
|
||||
closeButtonLabelText: text(
|
||||
'The label text for the close button (closeButtonLabelText)',
|
||||
'Clear search input'
|
||||
"The label text for the close button (closeButtonLabelText)",
|
||||
"Clear search input"
|
||||
),
|
||||
placeholder: text('Placeholder text (placeholder)', 'Search')
|
||||
}
|
||||
placeholder: text("Placeholder text (placeholder)", "Search"),
|
||||
},
|
||||
});
|
||||
|
||||
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