@wezom/toolkit-css-in-js
Version:
Useful tools for working with CSS-in-JS
44 lines (40 loc) • 692 B
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
/**
* @example
* jssAbsoluteGap('10px');
* // returns
* {
* width: 'auto',
* height: 'auto',
* top: '10px',
* right: '10px',
* bottom: '10px',
* left: '10px'
* }
*
* jssAbsoluteGap('10px', '2em');
* // returns
* {
* width: 'auto',
* height: 'auto',
* top: '10px',
* right: '2em',
* bottom: '10px',
* left: '2em'
* }
*/
function jssAbsoluteGap(x, y) {
if (y === void 0) {
y = x;
}
return {
width: 'auto',
height: 'auto',
top: x,
right: y,
bottom: x,
left: y
};
}
exports.jssAbsoluteGap = jssAbsoluteGap;