list.stories.js 566 B

1234567891011121314151617181920212223242526
  1. import range from 'lodash/range';
  2. import List from 'sentry/components/list';
  3. import ListItem from 'sentry/components/list/listItem';
  4. import {listSymbol} from 'sentry/components/list/utils';
  5. export default {
  6. title: 'Components/List',
  7. argTypes: {
  8. symbol: {
  9. options: Object.keys(listSymbol),
  10. control: {type: 'radio'},
  11. },
  12. },
  13. };
  14. export const _List = ({...args}) => {
  15. const items = range(0, 10);
  16. return (
  17. <List {...args}>
  18. {items.map(item => (
  19. <ListItem key={item}>Item {item + 1}</ListItem>
  20. ))}
  21. </List>
  22. );
  23. };