DropdownArrowIcon.tsx 565 B

123456789101112131415161718192021222324252627
  1. import React from 'react';
  2. import { useTheme } from 'styled-components';
  3. interface Props {
  4. isOpen: boolean;
  5. }
  6. const DropdownArrowIcon: React.FC<Props> = ({ isOpen }) => {
  7. const theme = useTheme();
  8. return (
  9. <svg
  10. width="24"
  11. height="24"
  12. fill="none"
  13. style={{ position: 'absolute', right: '5px' }}
  14. stroke="currentColor"
  15. strokeWidth="2"
  16. color={theme.icons.dropdownArrowIcon}
  17. transform={isOpen ? 'rotate(180)' : ''}
  18. >
  19. <path d="M6 9L12 15 18 9" />
  20. </svg>
  21. );
  22. };
  23. export default DropdownArrowIcon;