import { FC, SVGAttributes } from 'react'; import styles from './arrow.module.scss'; export type ArrowDirection = 'top' | 'right' | 'bottom' | 'left'; export type ArrowProps = SVGAttributes & { /** * The arrow direction. Default: right. */ direction: ArrowDirection; }; /** * Arrow component * * Render a svg arrow icon. */ export const Arrow: FC = ({ className = '', direction, ...props }) => { const directionClass = styles[`icon--${direction}`]; const classes = `${styles.icon} ${directionClass} ${className}`; if (direction === 'top') { return ( ); } if (direction === 'bottom') { return ( ); } if (direction === 'left') { return ( ); } return ( ); };