portainer/app/react/components/form-components/FormError.tsx

29 lines
609 B
TypeScript
Raw Normal View History

import { PropsWithChildren } from 'react';
import clsx from 'clsx';
import { AlertTriangle } from 'lucide-react';
import { Icon } from '@@/Icon';
interface Props {
className?: string;
}
export function FormError({ children, className }: PropsWithChildren<Props>) {
return (
2023-06-01 20:35:15 +00:00
<div
className={clsx(
`text-muted help-block !inline-flex gap-1 !align-top text-xs`,
className
)}
>
2023-06-01 20:35:15 +00:00
<Icon
icon={AlertTriangle}
mode="warning"
size="sm"
className="flex-none"
/>
<div className="text-warning">{children}</div>
</div>
);
}