@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
13 lines • 631 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useTooltipAsModal = void 0;
const react_1 = require("react");
// Order to get the value:
// 1st: We get by props the value
// 2nd: We get by theme the value
// 3rd: We dont get nothing, then We return false and tooltip acts like a tooltip
const useTooltipAsModal = ({ propTooltipAsModal, styleTooltipAsModal, }) => {
return (0, react_1.useMemo)(() => propTooltipAsModal ?? styleTooltipAsModal ?? false, [propTooltipAsModal, styleTooltipAsModal]);
};
exports.useTooltipAsModal = useTooltipAsModal;
//# sourceMappingURL=useTooltipAsModal.js.map