@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
17 lines • 695 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldOpenPopover = void 0;
const options_1 = require("./options");
const shouldOpenPopover = ({ open, useActionBottomSheet, options, loadingList = false, noResultText, hasHighlightedOption = false, }) => {
// If closed, nothing should be done
if (!open)
return false;
// The popover should be opened when required if:
return (useActionBottomSheet ||
(0, options_1.getLength)(options) > 0 ||
loadingList ||
noResultText?.content !== undefined ||
hasHighlightedOption);
};
exports.shouldOpenPopover = shouldOpenPopover;
//# sourceMappingURL=popover.js.map