UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

31 lines (30 loc) 865 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getContent = exports.checkMinMaxWidth = void 0; var _componentHelper = require("../../shared/component-helper.js"); const checkMinMaxWidth = (min, max) => { let maxWidth = max; let minWidth = min; if (min && !max && parseFloat(String(min)) > 0) { maxWidth = 0; } else if (max && !min && parseFloat(String(max)) > 0) { minWidth = 0; } return { minWidth, maxWidth }; }; exports.checkMinMaxWidth = checkMinMaxWidth; const getContent = props => { if (typeof props.modalContent === 'string') { return props.modalContent; } else if (typeof props.modalContent === 'function') { return props.modalContent(props); } return (0, _componentHelper.processChildren)(props); }; exports.getContent = getContent; //# sourceMappingURL=helpers.js.map