@atlaskit/modal-dialog
Version:
A modal dialog displays content that requires user interaction, in a layer above the page.
18 lines • 553 B
JavaScript
import { width } from './constants';
export var dialogWidth = function dialogWidth(input) {
if (!input) {
return 'auto';
}
var isWidthName = width.values.indexOf(input.toString()) !== -1;
var widthName = isWidthName && input;
if (widthName) {
return "".concat(width.widths[widthName], "px");
}
return typeof input === 'number' ? "".concat(input, "px") : input;
};
export var dialogHeight = function dialogHeight(input) {
if (!input) {
return 'auto';
}
return typeof input === 'number' ? "".concat(input, "px") : input;
};