2022-02-01 17:38:45 +00:00
|
|
|
import { PropsWithChildren } from 'react';
|
2022-09-21 04:49:42 +00:00
|
|
|
import clsx from 'clsx';
|
2022-11-28 02:00:28 +00:00
|
|
|
import { AlertTriangle } from 'lucide-react';
|
2022-02-01 17:38:45 +00:00
|
|
|
|
2022-08-02 23:15:00 +00:00
|
|
|
import { Icon } from '@@/Icon';
|
|
|
|
|
2022-09-21 04:49:42 +00:00
|
|
|
interface Props {
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function FormError({ children, className }: PropsWithChildren<Props>) {
|
2022-02-01 17:38:45 +00:00
|
|
|
return (
|
2023-02-22 20:13:33 +00:00
|
|
|
<p
|
|
|
|
className={clsx(`text-muted small vertical-center help-block`, className)}
|
|
|
|
>
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={AlertTriangle} className="icon-warning" />
|
2022-09-21 04:49:42 +00:00
|
|
|
<span className="text-warning">{children}</span>
|
|
|
|
</p>
|
2022-02-01 17:38:45 +00:00
|
|
|
);
|
|
|
|
}
|