keycloak-scim/js/libs/ui-shared/src/controls/FormErrorText.tsx
Jon Koops d3c2475041
Upgrade admin and account console to PatternFly 5 (#28196)
Closes #21345
Closes #21344

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Co-authored-by: Mark Franceschelli <mfrances@redhat.com>
Co-authored-by: Hynek Mlnařík <hmlnarik@redhat.com>
Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
2024-04-05 16:37:05 +02:00

23 lines
571 B
TypeScript

import {
FormHelperText,
FormHelperTextProps,
HelperText,
HelperTextItem,
} from "@patternfly/react-core";
import { ExclamationCircleIcon } from "@patternfly/react-icons";
export type FormErrorTextProps = FormHelperTextProps & {
message: string;
};
export const FormErrorText = ({ message, ...props }: FormErrorTextProps) => {
return (
<FormHelperText {...props}>
<HelperText>
<HelperTextItem icon={<ExclamationCircleIcon />} variant="error">
{message}
</HelperTextItem>
</HelperText>
</FormHelperText>
);
};