@atlaskit/modal-dialog
Version:
A modal dialog displays content that requires user interaction, in a layer above the page.
18 lines (17 loc) • 521 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.dialogWidth = void 0;
var _width = require("../width");
var dialogWidth = exports.dialogWidth = function dialogWidth(input) {
if (!input) {
return 'auto';
}
var isWidthName = _width.width.values.indexOf(input.toString()) !== -1;
var widthName = isWidthName && input;
if (widthName) {
return "".concat(_width.width.widths[widthName], "px");
}
return typeof input === 'number' ? "".concat(input, "px") : input;
};