@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
29 lines (24 loc) • 811 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _consts = _interopRequireDefault(require("./consts"));
const getSpacingToken = ({
spaceAfter,
theme
}) => {
const tokens = {
[_consts.default.NONE]: "0",
[_consts.default.SMALLEST]: theme.orbit.spaceXXSmall,
[_consts.default.SMALL]: theme.orbit.spaceXSmall,
[_consts.default.NORMAL]: theme.orbit.spaceSmall,
[_consts.default.MEDIUM]: theme.orbit.spaceMedium,
[_consts.default.LARGE]: theme.orbit.spaceLarge,
[_consts.default.LARGEST]: theme.orbit.spaceXLarge
};
return spaceAfter && tokens[spaceAfter];
};
var _default = getSpacingToken;
exports.default = _default;