UNPKG

@wordpress/components

Version:
19 lines (18 loc) 460 B
const GRID_BASE = "4px"; function space(value) { if (typeof value === "undefined") { return void 0; } if (!value) { return "0"; } const asInt = typeof value === "number" ? value : Number(value); if (typeof window !== "undefined" && window.CSS?.supports?.("margin", value.toString()) || Number.isNaN(asInt)) { return value.toString(); } return `calc(${GRID_BASE} * ${value})`; } export { space }; //# sourceMappingURL=space.js.map