UNPKG

@wordpress/components

Version:
19 lines (17 loc) 478 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.space = space; const SPACE_GRID_BASE = 8; /** * Creates a spacing CSS value (px) based on grid system values. * * @param {number} [value=1] Multiplier against the grid base value (8) * @return {string} The spacing value (px). */ function space(value = 1) { if (isNaN(value)) return `${SPACE_GRID_BASE}px`; return `${SPACE_GRID_BASE * value}px`; } //# sourceMappingURL=space.js.map