The Node.js® Website
at main 458 B view raw
1import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/solid'; 2import type { FC, SVGAttributes } from 'react'; 3 4type PrevNextArrowProps = { 5 type: 'previous' | 'next'; 6} & SVGAttributes<SVGSVGElement>; 7 8const PrevNextArrow: FC<PrevNextArrowProps> = ({ type, ...extra }) => { 9 const ChevronComponent = 10 type === 'previous' ? ChevronLeftIcon : ChevronRightIcon; 11 12 return <ChevronComponent {...extra} />; 13}; 14 15export default PrevNextArrow;