@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.
24 lines (18 loc) • 1.46 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _consts = require("../consts");
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 getSizeToken = function getSizeToken(name) {
return function (_ref) {
var _TOKENS$heightButton, _TOKENS$fontSizeButto, _tokens;
var theme = _ref.theme,
size = _ref.size;
var tokens = (_tokens = {}, _defineProperty(_tokens, _consts.TOKENS.heightButton, (_TOKENS$heightButton = {}, _defineProperty(_TOKENS$heightButton, _consts.SIZES.LARGE, theme.orbit.heightButtonLarge), _defineProperty(_TOKENS$heightButton, _consts.SIZES.NORMAL, theme.orbit.heightButtonNormal), _defineProperty(_TOKENS$heightButton, _consts.SIZES.SMALL, theme.orbit.heightButtonSmall), _TOKENS$heightButton)), _defineProperty(_tokens, _consts.TOKENS.fontSizeButton, (_TOKENS$fontSizeButto = {}, _defineProperty(_TOKENS$fontSizeButto, _consts.SIZES.LARGE, theme.orbit.fontSizeButtonLarge), _defineProperty(_TOKENS$fontSizeButto, _consts.SIZES.NORMAL, theme.orbit.fontSizeButtonNormal), _defineProperty(_TOKENS$fontSizeButto, _consts.SIZES.SMALL, theme.orbit.fontSizeButtonSmall), _TOKENS$fontSizeButto)), _tokens);
return tokens[name][size];
};
};
var _default = getSizeToken;
exports.default = _default;