File size: 774 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import SelectDropdown from '.';
export default { component: SelectDropdown, title: 'Unaudited/SelectDropdown' };
const Template = ( args ) => {
return <SelectDropdown { ...args } />;
};
export const Default = Template.bind( {} );
Default.args = {
ariaLabel: 'select-dropdown-aria-label',
className: 'select-dropdown',
compact: false,
disabled: false,
isLoading: false,
// eslint-disable-next-line no-console
onToggle: () => console.log( 'Toggled' ),
onSelect: ( { label } ) => {
// eslint-disable-next-line no-console
console.log( `${ label } Dropdown item selected` );
},
initialSelected: 'pikachu',
options: [
{ value: 'pikachu', label: 'Pikachu' },
{ value: 'charmander', label: 'Charmander' },
{ value: 'bulbasaur', label: 'Bulbasaur' },
],
};
|