import React from 'react'; import orderBy from 'lodash.orderby'; import { storiesOf } from '@storybook/react'; import { text } from '@storybook/addon-knobs'; import { MenuSelect, Panel, SearchBox } from 'react-instantsearch-dom'; import { WrapWithHits } from './util'; const stories = storiesOf('MenuSelect', module); stories .add('default', () => ( )) .add('with default selected item', () => ( )) .add('with the sort strategy changed', () => ( orderBy(items, ['label', 'count'], ['asc', 'desc']) } /> )) .add('playground', () => ( )) .add('with localized count', () => ( items.map(({ count, ...item }) => ({ ...item, count: (count + 1000).toLocaleString(), })) } /> )) .add('with Panel', () => ( )) .add('with Panel but no refinement', () => (
));