iconPanel.tsx 936 B

12345678910111213141516171819202122232425262728293031
  1. import {forwardRef} from 'react';
  2. import theme from 'sentry/utils/theme';
  3. import {SvgIcon, SVGIconProps} from './svgIcon';
  4. interface Props extends SVGIconProps {
  5. direction?: 'up' | 'right' | 'down' | 'left';
  6. }
  7. const IconPanel = forwardRef<SVGSVGElement, Props>(
  8. ({direction = 'up', ...props}, ref) => {
  9. return (
  10. <SvgIcon
  11. {...props}
  12. ref={ref}
  13. style={{
  14. transform: direction
  15. ? `rotate(${theme.iconDirections[direction]}deg)`
  16. : undefined,
  17. }}
  18. >
  19. <path d="M16,13.25V2.75C16,1.23,14.77,0,13.25,0H2.75C1.23,0,0,1.23,0,2.75V13.25c0,1.52,1.23,2.75,2.75,2.75H13.25c1.52,0,2.75-1.23,2.75-2.75ZM1.5,4.58v-1.83c0-.69,.56-1.25,1.25-1.25H13.25c.69,0,1.25,.56,1.25,1.25v1.83H1.5Zm1.25,9.92c-.69,0-1.25-.56-1.25-1.25V6.08H14.5v7.17c0,.69-.56,1.25-1.25,1.25H2.75Z" />
  20. </SvgIcon>
  21. );
  22. }
  23. );
  24. IconPanel.displayName = 'IconPanel';
  25. export {IconPanel};