UNPKG

blockstack-ui

Version:

Blockstack UI components built with css-in-js and styled-system.

20 lines (14 loc) 551 B
"use strict"; exports.__esModule = true; exports.computeSize = void 0; require("core-js/modules/es6.regexp.to-string"); require("core-js/modules/es6.date.to-string"); require("core-js/modules/es6.regexp.replace"); var computeSize = function computeSize(widthProp, baseWidth, typeSize) { if (widthProp) return widthProp; var width = baseWidth && baseWidth.toString().replace(/[^0-9]/g, ''); var defaultSize = 16; var x = typeSize / defaultSize; return x !== 1 ? baseWidth * x + "px" : width + "px"; }; exports.computeSize = computeSize;