jsx import { jsx } from '@emotion/core' ; import type { Rotation } from './ArrowIcon' ; import { SVGIcon , SVGIconProps } from './SVGIcon' ; export interface Props extends SVGIconProps { direction ? : keyof Rotation ; } const rotation = { down : 0 , left : 90 , up : 180 , right : 270 , } ; export const TriangleIcon = ( { direction = 'down' , ... props } ) => ( < SVGIcon realWidth = { 8 } realHeight = { 8 } { ... props } > < path transform = { `rotate(${ rotation [ direction ] } 4 4)` } fillRule = "evenodd" d = "M0 2h8L4 7" / > < /SVGIcon>);