import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { IconProp } from '@fortawesome/fontawesome-svg-core'; import tw from 'twin.macro'; interface Props { icon?: IconProp; title: string | React.ReactNode; className?: string; children: React.ReactNode; } const TitledGreyBox = ({ icon, title, children, className }: Props) => (
{typeof title === 'string' ?

{icon && }{title}

: title }
{children}
); export default TitledGreyBox;