@cimpress/react-components
Version:
React components to support the MCP styleguide
46 lines • 1.32 kB
JavaScript
import * as React from 'react';
import { Select } from '../Select';
const meta = {
title: 'Components/Select',
component: Select,
};
export default meta;
function SelectStory(props) {
const [value, setValue] = React.useState('');
return React.createElement(Select, Object.assign({}, props, { onChange: value => setValue(value), value: value }));
}
export const Default = {
render: SelectStory,
args: {
label: 'Select an option',
options: [
{ label: 'Option 1', value: 'option1' },
{ label: 'Option 2', value: 'option2' },
{ label: 'Option 3', value: 'option3' },
],
},
};
export const Multiple = {
render: SelectStory,
args: {
label: 'Select an option',
options: [
{ label: 'Option 1', value: 'option1' },
{ label: 'Option 2', value: 'option2' },
{ label: 'Option 3', value: 'option3' },
],
isMulti: true,
},
};
export const Status = {
render: SelectStory,
args: {
label: 'Select an option',
options: [
{ label: 'Option 1', value: 'option1' },
{ label: 'Option 2', value: 'option2' },
{ label: 'Option 3', value: 'option3' },
],
},
};
//# sourceMappingURL=Select.stories.js.map