@atlaskit/navigation-system
Version:
Page layout and navigation components for Atlassian apps.
13 lines (12 loc) • 348 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.resolveLayoutWidth = resolveLayoutWidth;
function resolveLayoutWidth(bound, viewportWidth) {
if (typeof bound === 'number') {
return bound;
}
var value = Number.parseFloat(bound);
return bound.endsWith('vw') ? viewportWidth * value / 100 : value;
}