import { CSSProperties } from 'react'; import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import tw from 'twin.macro'; interface Props { icon: IconDefinition; className?: string; style?: CSSProperties; } const Icon = ({ icon, className, style }: Props) => { const [width, height, , , paths] = icon.icon; return ( {(Array.isArray(paths) ? paths : [paths]).map((path, index) => ( ))} ); }; export default Icon;