UNPKG

@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.

22 lines (15 loc) 3.45 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _consts = require("../consts"); var getButtonLinkTypeToken = function getButtonLinkTypeToken(name, type, theme) { var _TOKENS$background, _TOKENS$backgroundHov, _TOKENS$backgroundAct, _TOKENS$foreground, _TOKENS$foregroundHov, _TOKENS$foregroundAct, _tokens; var tokens = (_tokens = {}, (0, _defineProperty2.default)(_tokens, _consts.TOKENS.background, (_TOKENS$background = {}, (0, _defineProperty2.default)(_TOKENS$background, _consts.TYPES.PRIMARY, "transparent"), (0, _defineProperty2.default)(_TOKENS$background, _consts.TYPES.SECONDARY, "transparent"), (0, _defineProperty2.default)(_TOKENS$background, _consts.TYPES.CRITICAL, "transparent"), _TOKENS$background)), (0, _defineProperty2.default)(_tokens, _consts.TOKENS.backgroundHover, (_TOKENS$backgroundHov = {}, (0, _defineProperty2.default)(_TOKENS$backgroundHov, _consts.TYPES.PRIMARY, theme.orbit.paletteProductLightHover), (0, _defineProperty2.default)(_TOKENS$backgroundHov, _consts.TYPES.SECONDARY, theme.orbit.paletteCloudLightHover), (0, _defineProperty2.default)(_TOKENS$backgroundHov, _consts.TYPES.CRITICAL, theme.orbit.paletteRedLightHover), _TOKENS$backgroundHov)), (0, _defineProperty2.default)(_tokens, _consts.TOKENS.backgroundActive, (_TOKENS$backgroundAct = {}, (0, _defineProperty2.default)(_TOKENS$backgroundAct, _consts.TYPES.PRIMARY, theme.orbit.paletteProductLightActive), (0, _defineProperty2.default)(_TOKENS$backgroundAct, _consts.TYPES.SECONDARY, theme.orbit.paletteCloudLightActive), (0, _defineProperty2.default)(_TOKENS$backgroundAct, _consts.TYPES.CRITICAL, theme.orbit.paletteRedLightActive), _TOKENS$backgroundAct)), (0, _defineProperty2.default)(_tokens, _consts.TOKENS.foreground, (_TOKENS$foreground = {}, (0, _defineProperty2.default)(_TOKENS$foreground, _consts.TYPES.PRIMARY, theme.orbit.colorTextButtonLinkPrimary), (0, _defineProperty2.default)(_TOKENS$foreground, _consts.TYPES.SECONDARY, theme.orbit.colorTextButtonLinkSecondary), (0, _defineProperty2.default)(_TOKENS$foreground, _consts.TYPES.CRITICAL, theme.orbit.paletteRedNormal), _TOKENS$foreground)), (0, _defineProperty2.default)(_tokens, _consts.TOKENS.foregroundHover, (_TOKENS$foregroundHov = {}, (0, _defineProperty2.default)(_TOKENS$foregroundHov, _consts.TYPES.PRIMARY, theme.orbit.colorTextButtonLinkPrimaryHover), (0, _defineProperty2.default)(_TOKENS$foregroundHov, _consts.TYPES.SECONDARY, theme.orbit.colorTextButtonLinkSecondaryHover), (0, _defineProperty2.default)(_TOKENS$foregroundHov, _consts.TYPES.CRITICAL, theme.orbit.paletteRedNormalHover), _TOKENS$foregroundHov)), (0, _defineProperty2.default)(_tokens, _consts.TOKENS.foregroundActive, (_TOKENS$foregroundAct = {}, (0, _defineProperty2.default)(_TOKENS$foregroundAct, _consts.TYPES.PRIMARY, theme.orbit.colorTextButtonLinkPrimaryActive), (0, _defineProperty2.default)(_TOKENS$foregroundAct, _consts.TYPES.SECONDARY, theme.orbit.colorTextButtonLinkSecondaryActive), (0, _defineProperty2.default)(_TOKENS$foregroundAct, _consts.TYPES.CRITICAL, theme.orbit.paletteRedNormalActive), _TOKENS$foregroundAct)), _tokens); return tokens[name][type]; }; var _default = getButtonLinkTypeToken; exports.default = _default;