UNPKG

@atlaskit/modal-dialog

Version:

A modal dialog displays content that requires user interaction, in a layer above the page.

12 lines 349 B
import { width } from '../width'; export const dialogWidth = input => { if (!input) { return 'auto'; } const isWidthName = width.values.indexOf(input.toString()) !== -1; const widthName = isWidthName && input; if (widthName) { return `${width.widths[widthName]}px`; } return typeof input === 'number' ? `${input}px` : input; };