dropdownLink.stories.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import DropdownLink from 'sentry/components/dropdownLink';
  2. import MenuItem from 'sentry/components/menuItem';
  3. export default {
  4. title: 'Components/Buttons/Dropdowns/Dropdown Link',
  5. component: DropdownLink,
  6. };
  7. export const AnchorLeftDefault = () => (
  8. <div className="clearfix">
  9. <DropdownLink title="Test">
  10. <MenuItem href="">Item</MenuItem>
  11. </DropdownLink>
  12. </div>
  13. );
  14. AnchorLeftDefault.storyName = 'Anchor Left (default)';
  15. export const AnchorRight = () => (
  16. <div className="clearfix">
  17. <DropdownLink anchorRight title="Test">
  18. <MenuItem href="">Item</MenuItem>
  19. </DropdownLink>
  20. </div>
  21. );
  22. AnchorRight.storyName = 'Anchor Right';
  23. export const NestedDropdown = () => (
  24. <div className="clearfix">
  25. <DropdownLink title="Nested Menu">
  26. <li className="dropdown-submenu">
  27. <DropdownLink title="submenu" caret={false} isNestedDropdown alwaysRenderMenu>
  28. <MenuItem href="">Sub Item 1</MenuItem>
  29. <MenuItem href="">Sub Item 2</MenuItem>
  30. </DropdownLink>
  31. </li>
  32. <MenuItem href="">Item 2</MenuItem>
  33. </DropdownLink>
  34. </div>
  35. );
  36. NestedDropdown.storyName = 'Nested Dropdowns';