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-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 (
|
2022-09-21 04:49:42 +00:00
|
|
|
<p className={clsx(`text-muted small vertical-center`, className)}>
|
|
|
|
<Icon icon="alert-triangle" className="icon-warning" feather />
|
|
|
|
<span className="text-warning">{children}</span>
|
|
|
|
</p>
|
2022-02-01 17:38:45 +00:00
|
|
|
);
|
|
|
|
}
|