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