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