ClusterMenuItem.styled.ts 898 B

12345678910111213141516171819202122232425262728293031323334
  1. import styled from 'styled-components';
  2. import { MenuItemProps } from './ClusterMenuItem';
  3. const StyledMenuItem = styled.li<MenuItemProps>`
  4. font-family: 'Inter', sans-serif;
  5. font-style: normal;
  6. font-weight: normal;
  7. font-size: 14px;
  8. ${({ to, theme, liType }) =>
  9. to
  10. ? `
  11. & a {
  12. padding: 0.5em 0.75em;
  13. cursor: pointer;
  14. text-decoration: none;
  15. margin: 0px 0px;
  16. line-height: 20px;
  17. background-color: ${theme.liStyles[liType].backgroundColor.normal};
  18. color: ${theme.liStyles[liType].color.normal};
  19. &.is-active {
  20. background-color: ${theme.liStyles[liType].backgroundColor.active};
  21. color: ${theme.liStyles[liType].color.active};
  22. }
  23. }
  24. `
  25. : `padding: 0.5em 0.75em;`}
  26. `;
  27. StyledMenuItem.displayName = 'StyledMenuItem';
  28. export default StyledMenuItem;