Files
the-biergarten-app/components/ui/forms/FormError.tsx
2023-01-28 21:05:20 -05:00

19 lines
541 B
TypeScript

import { FunctionComponent } from 'react';
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
// import { faTriangleExclamation } from '@fortawesome/free-solid-svg-icons';
/**
* @example
* <FormError>Something went wrong!</FormError>;
*/
const FormError: FunctionComponent<{ children: string | undefined }> = ({ children }) =>
children ? (
<div
className="my-1 h-3 text-xs font-semibold italic text-error-content"
role="alert"
>
{children}
</div>
) : null;
export default FormError;