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