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.

11 lines (8 loc) 2.63 kB
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import { TOKENS, TYPES } from "../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 = {}, _defineProperty(_tokens, TOKENS.background, (_TOKENS$background = {}, _defineProperty(_TOKENS$background, TYPES.PRIMARY, "transparent"), _defineProperty(_TOKENS$background, TYPES.SECONDARY, "transparent"), _defineProperty(_TOKENS$background, TYPES.CRITICAL, "transparent"), _TOKENS$background)), _defineProperty(_tokens, TOKENS.backgroundHover, (_TOKENS$backgroundHov = {}, _defineProperty(_TOKENS$backgroundHov, TYPES.PRIMARY, theme.orbit.paletteProductLightHover), _defineProperty(_TOKENS$backgroundHov, TYPES.SECONDARY, theme.orbit.paletteCloudLightHover), _defineProperty(_TOKENS$backgroundHov, TYPES.CRITICAL, theme.orbit.paletteRedLightHover), _TOKENS$backgroundHov)), _defineProperty(_tokens, TOKENS.backgroundActive, (_TOKENS$backgroundAct = {}, _defineProperty(_TOKENS$backgroundAct, TYPES.PRIMARY, theme.orbit.paletteProductLightActive), _defineProperty(_TOKENS$backgroundAct, TYPES.SECONDARY, theme.orbit.paletteCloudLightActive), _defineProperty(_TOKENS$backgroundAct, TYPES.CRITICAL, theme.orbit.paletteRedLightActive), _TOKENS$backgroundAct)), _defineProperty(_tokens, TOKENS.foreground, (_TOKENS$foreground = {}, _defineProperty(_TOKENS$foreground, TYPES.PRIMARY, theme.orbit.paletteProductNormal), _defineProperty(_TOKENS$foreground, TYPES.SECONDARY, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$foreground, TYPES.CRITICAL, theme.orbit.paletteRedNormal), _TOKENS$foreground)), _defineProperty(_tokens, TOKENS.foregroundHover, (_TOKENS$foregroundHov = {}, _defineProperty(_TOKENS$foregroundHov, TYPES.PRIMARY, theme.orbit.paletteProductNormalHover), _defineProperty(_TOKENS$foregroundHov, TYPES.SECONDARY, theme.orbit.paletteInkNormalHover), _defineProperty(_TOKENS$foregroundHov, TYPES.CRITICAL, theme.orbit.paletteRedNormalHover), _TOKENS$foregroundHov)), _defineProperty(_tokens, TOKENS.foregroundActive, (_TOKENS$foregroundAct = {}, _defineProperty(_TOKENS$foregroundAct, TYPES.PRIMARY, theme.orbit.paletteProductNormalActive), _defineProperty(_TOKENS$foregroundAct, TYPES.SECONDARY, theme.orbit.paletteInkNormalActive), _defineProperty(_TOKENS$foregroundAct, TYPES.CRITICAL, theme.orbit.paletteRedNormalActive), _TOKENS$foregroundAct)), _tokens); return tokens[name][type]; }; export default getButtonLinkTypeToken;