d3c2475041
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>
23 lines
571 B
TypeScript
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>
|
|
);
|
|
};
|