UNPKG

@keycloakify/keycloak-admin-ui

Version:
6 lines 653 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { FormGroup } from "@patternfly/react-core"; import { FormErrorText } from "../../ui-shared/controls/FormErrorText"; import { HelpItem } from "../../ui-shared/controls/HelpItem"; export const FormLabel = ({ name, label, labelIcon, error, children, ...rest }) => (_jsxs(FormGroup, { label: label || name, fieldId: name, labelIcon: labelIcon ? (_jsx(HelpItem, { helpText: labelIcon, fieldLabelId: name })) : undefined, ...rest, children: [children, error && (_jsx(FormErrorText, { "data-testid": `${name}-helper`, message: error.message }))] })); //# sourceMappingURL=FormLabel.js.map