@kiwicom/orbit-components
Version:
<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"
25 lines (16 loc) • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _consts = require("./consts");
var _consts2 = _interopRequireDefault(_consts);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var getSpacingToken = function getSpacingToken(_ref) {
var _tokens;
var spaceAfter = _ref.spaceAfter,
theme = _ref.theme;
var tokens = (_tokens = {}, _defineProperty(_tokens, _consts2.default.SMALLEST, theme.orbit.spaceXXSmall), _defineProperty(_tokens, _consts2.default.SMALL, theme.orbit.spaceXSmall), _defineProperty(_tokens, _consts2.default.NORMAL, theme.orbit.spaceSmall), _defineProperty(_tokens, _consts2.default.MEDIUM, theme.orbit.spaceMedium), _defineProperty(_tokens, _consts2.default.LARGE, theme.orbit.spaceLarge), _defineProperty(_tokens, _consts2.default.LARGEST, theme.orbit.spaceXLarge), _tokens);
return spaceAfter && tokens[spaceAfter];
};
exports.default = getSpacingToken;