UNPKG

@keycloakify/keycloak-admin-ui

Version:
13 lines 687 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useState } from "react"; import { Tooltip } from "@patternfly/react-core"; export const GroupPath = ({ group: { path }, onMouseEnter: onMouseEnterProp, ...props }) => { const [tooltip, setTooltip] = useState(""); const onMouseEnter = (event) => { setTooltip(path); onMouseEnterProp === null || onMouseEnterProp === void 0 ? void 0 : onMouseEnterProp(event); }; const text = (_jsx("span", { onMouseEnter: onMouseEnter, ...props, children: path })); return tooltip !== "" ? (_jsx(Tooltip, { content: tooltip, isVisible: true, children: text })) : (text); }; //# sourceMappingURL=GroupPath.js.map