@brizy/ui
Version:
React elements in Brizy style
11 lines (10 loc) • 444 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDropdownHeight = void 0;
const getDropdownHeight = (itemsCount, itemHeight, minItems, maxItems) => {
const minHeight = itemHeight * minItems;
const maxHeight = itemHeight * maxItems;
const itemsHeight = itemsCount * itemHeight;
return Math.max(minHeight, Math.min(maxHeight, itemsHeight));
};
exports.getDropdownHeight = getDropdownHeight;