UNPKG

@keycloakify/keycloak-account-ui

Version:

<p align="center"> <img src="https://github.com/user-attachments/assets/e31c4910-7205-441c-9a35-e134b806b3a8"> </p> <p align="center"> <i>Repackaged Keycloak Account UI</i> <br> <br> <a href="https://github.com/keycloakify/keycloak-a

9 lines 902 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import { Icon, Popover } from "@patternfly/react-core"; import { HelpIcon } from "@patternfly/react-icons"; import { useHelp } from "../../ui-shared/context/HelpContext"; export const HelpItem = ({ helpText, fieldLabelId, noVerticalAlign = true, unWrap = false, }) => { const { enabled } = useHelp(); return enabled ? (_jsx(Popover, { bodyContent: helpText, children: _jsxs(_Fragment, { children: [!unWrap && (_jsx("button", { "data-testid": `help-label-${fieldLabelId}`, "aria-label": fieldLabelId, onClick: (e) => e.preventDefault(), className: "pf-v5-c-form__group-label-help", children: _jsx(Icon, { isInline: noVerticalAlign, children: _jsx(HelpIcon, {}) }) })), unWrap && (_jsx(Icon, { isInline: noVerticalAlign, children: _jsx(HelpIcon, {}) }))] }) })) : null; }; //# sourceMappingURL=HelpItem.js.map