breadcrumbs.stories.js 777 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {action} from '@storybook/addon-actions';
  2. import Breadcrumbs from 'sentry/components/breadcrumbs';
  3. export default {
  4. title: 'Views/Breadcrumbs',
  5. component: Breadcrumbs,
  6. };
  7. export const _Breadcrumbs = () => (
  8. <Breadcrumbs
  9. crumbs={[
  10. {label: 'Test 1', to: '#'},
  11. {label: 'Test 2', to: '#'},
  12. {label: 'Test 3', to: '#'},
  13. {label: 'Test 4', to: null},
  14. ]}
  15. />
  16. );
  17. export const _BreadcrumbWithDropdown = () => (
  18. <Breadcrumbs
  19. crumbs={[
  20. {
  21. label: 'dropdown crumb',
  22. onSelect: action('onSelect'),
  23. items: [{label: 'item1'}, {label: 'item2'}, {label: 'item3'}],
  24. },
  25. {
  26. label: 'Test 2',
  27. to: '/test2',
  28. },
  29. {
  30. label: 'Test 3',
  31. to: null,
  32. },
  33. ]}
  34. />
  35. );