mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
feat(components): add Search component
This commit is contained in:
parent
a56e45058a
commit
8ff35b7642
7 changed files with 137 additions and 3 deletions
27
src/components/Search/Search.stories.js
Normal file
27
src/components/Search/Search.stories.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { withKnobs, select, boolean, text } from '@storybook/addon-knobs';
|
||||
import Component from './Search.Story.svelte';
|
||||
|
||||
export default { title: 'Search', decorators: [withKnobs] };
|
||||
|
||||
const sizes = {
|
||||
'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'),
|
||||
closeButtonLabelText: text(
|
||||
'The label text for the close button (closeButtonLabelText)',
|
||||
'Clear search input'
|
||||
),
|
||||
placeHolderText: text('Placeholder text (placeHolderText)', 'Search')
|
||||
}
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: 'skeleton' } });
|
Loading…
Add table
Add a link
Reference in a new issue