List.styled.ts 656 B

12345678910111213141516171819202122
  1. import { NavLink } from 'react-router-dom';
  2. import styled, { css } from 'styled-components';
  3. export const Link = styled(NavLink).attrs({ activeClassName: 'is-active' })<{
  4. $isInternal?: boolean;
  5. }>(
  6. ({ theme, activeClassName, $isInternal }) => css`
  7. color: ${theme.topicsList.color.normal};
  8. font-weight: 500;
  9. padding-left: ${$isInternal ? '5px' : 0};
  10. &:hover {
  11. background-color: ${theme.topicsList.backgroundColor.hover};
  12. color: ${theme.topicsList.color.hover};
  13. }
  14. &.${activeClassName} {
  15. background-color: ${theme.topicsList.backgroundColor.active};
  16. color: ${theme.topicsList.color.active};
  17. }
  18. `
  19. );