divider.tsx 570 B

12345678910111213141516171819202122232425262728
  1. import styled from '@emotion/styled';
  2. import {IconChevron} from 'sentry/icons';
  3. type Props = {
  4. isHover?: boolean;
  5. isLast?: boolean;
  6. };
  7. const Divider = ({isHover, isLast}: Props) =>
  8. isLast ? null : (
  9. <StyledDivider>
  10. <StyledIconChevron direction={isHover ? 'down' : 'right'} size="14px" />
  11. </StyledDivider>
  12. );
  13. const StyledIconChevron = styled(IconChevron)`
  14. display: block;
  15. `;
  16. const StyledDivider = styled('span')`
  17. display: inline-block;
  18. margin-left: 6px;
  19. color: ${p => p.theme.gray200};
  20. position: relative;
  21. `;
  22. export default Divider;