UNPKG

fui-fancyui

Version:
21 lines (20 loc) 389 B
function p(n, r, o = 16) { let t = o; if (n > 1) for (let i = 2; i <= n; i++) { const u = i % 2 === 0 ? 1.5 : 1.33; t = t * u; } const e = Math.round(t); return r ? e + "px" : e; } function c(n, r, o = 16) { const t = {}; for (let e = 1; e <= n; e++) t[e] = p(e, r, o); return t; } export { p as generateComponentSize, c as getComponentSizeMap };