You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/form-components/FormError.tsx

33 lines
650 B

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>) {
if (!children) {
return null;
}
return (
<div
className={clsx(
`text-muted help-block !inline-flex gap-1 !align-top text-xs`,
className
)}
>
<Icon
icon={AlertTriangle}
mode="warning"
size="sm"
className="flex-none"
/>
<div className="text-warning">{children}</div>
</div>
);
}