import React, { FC } from 'react'; import { Story } from '@storybook/react'; import { Button, Checkbox, Divider, Input, Wrapper } from '../../..'; import { Dropdown, DropdownPropsType } from './dropdown.component'; export default { title: 'GEENEE-UI/Dropdown', component: Dropdown }; type StoryArgsType = { [key: string]: any; } & DropdownPropsType const PlaygroundTemplate: FC = (props: StoryArgsType) => { const [ activeItem, setActiveItem ] = React.useState(null); const handleChange = (_event: React.SyntheticEvent, menuItemId: string | null) => { setActiveItem(menuItemId); }; const items = [ 1, 2, 3, 4, 5 ].map((num) => ( )); return (
) } // controlled menuWidth="100%" > { (dropdownOpen) => ( ) }
); }; // eslint-disable-next-line react/function-component-definition export const Playground: Story = (props: StoryArgsType) => ( ); Playground.args = {}; Playground.bind({});