import { FunctionComponent, ReactElement } from 'react' import { CheckCircleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, InformationCircleIcon, } from '@heroicons/react/20/solid' interface InlineNotificationProps { desc?: string | ReactElement title?: string | ReactElement type: 'error' | 'info' | 'success' | 'warning' hideBorder?: boolean hidePadding?: boolean } const InlineNotification: FunctionComponent = ({ desc, title, type, hideBorder, hidePadding, }) => { const iconClasses = `mr-1.5 ${ hidePadding ? 'h-4 w-4' : 'h-5 w-5' } flex-shrink-0` return (
{type === 'error' ? ( ) : null} {type === 'success' ? ( ) : null} {type === 'warning' ? ( ) : null} {type === 'info' ? ( ) : null}
{title}
{desc}
) } export default InlineNotification