import * as React from 'react'; import * as SelectMenuStories from './SelectMenu.stories.mdx'; import {generateChromaticStory} from '../../chromatic/utils'; import SelectMenu, {SIZE as SELECT_SIZE} from './SelectMenu'; import Text from '../text/Text'; import Flex from '../flex/Flex'; const onOptionChange = () => null; // @ts-ignore TS7006 export const Sizes = args => { return (
{Object.values(SELECT_SIZE).map(size => (
))}
); }; // @ts-ignore TS7006 export const DifferentPopupLenghts = args => { return (
Popup with wide content:
Popup with short content that stretches to 70% of the input:
Popup with short content and short input:
); }; // @ts-ignore TS7006 const Hovers = args => { const types = [{name: 'default'}, {disabled: true, name: 'disabled'}]; return ( {types.map(t => ( {t.name} ))} {types.map(t => (
White: {t.name}
))}
); }; export const Default = generateChromaticStory( { ...SelectMenuStories, }, { storiesToHover: [Hovers], } ); const {includeStories, ...meta} = SelectMenuStories.default; export default meta;