import React, { FC } from 'react'; import ErrorIcon from './icons/ErrorIcon'; import { classNames } from '@/utils'; import isEmpty from 'lodash/isEmpty'; type ErrorMessageProps = { value: string | string[]; } & React.HTMLAttributes; const ErrorMessage: FC = ({ value, className, ...rest }) => { if (isEmpty(value)) return null; return (

{Array.isArray(value) ? value.join(', ') : value}

); }; export default ErrorMessage;