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.

12 lines (9 loc) 4.97 kB
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import { convertHexToRgba } from "@kiwicom/orbit-design-tokens"; import { TOKENS, TYPE_OPTIONS } from "../consts"; var getSocialButtonTypeToken = function getSocialButtonTypeToken(name, type, theme) { var _TOKENS$backgroundBut, _TOKENS$backgroundBut2, _TOKENS$backgroundBut3, _TOKENS$backgroundBut4, _TOKENS$colorTextButt, _TOKENS$colorTextButt2, _TOKENS$colorTextButt3, _TOKENS$iconColor, _TOKENS$borderColorBu, _tokens; var tokens = (_tokens = {}, _defineProperty(_tokens, TOKENS.backgroundButton, (_TOKENS$backgroundBut = {}, _defineProperty(_TOKENS$backgroundBut, TYPE_OPTIONS.APPLE, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$backgroundBut, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteCloudDark), _defineProperty(_TOKENS$backgroundBut, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteCloudDark), _defineProperty(_TOKENS$backgroundBut, TYPE_OPTIONS.TWITTER, theme.orbit.paletteCloudDark), _TOKENS$backgroundBut)), _defineProperty(_tokens, TOKENS.backgroundButtonHover, (_TOKENS$backgroundBut2 = {}, _defineProperty(_TOKENS$backgroundBut2, TYPE_OPTIONS.APPLE, theme.orbit.paletteInkNormalHover), _defineProperty(_TOKENS$backgroundBut2, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteCloudNormalHover), _defineProperty(_TOKENS$backgroundBut2, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteCloudNormalHover), _defineProperty(_TOKENS$backgroundBut2, TYPE_OPTIONS.TWITTER, theme.orbit.paletteCloudNormalHover), _TOKENS$backgroundBut2)), _defineProperty(_tokens, TOKENS.backgroundButtonActive, (_TOKENS$backgroundBut3 = {}, _defineProperty(_TOKENS$backgroundBut3, TYPE_OPTIONS.APPLE, theme.orbit.paletteInkNormalActive), _defineProperty(_TOKENS$backgroundBut3, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteCloudNormalActive), _defineProperty(_TOKENS$backgroundBut3, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteCloudNormalActive), _defineProperty(_TOKENS$backgroundBut3, TYPE_OPTIONS.TWITTER, theme.orbit.paletteCloudNormalActive), _TOKENS$backgroundBut3)), _defineProperty(_tokens, TOKENS.backgroundButtonFocus, (_TOKENS$backgroundBut4 = {}, _defineProperty(_TOKENS$backgroundBut4, TYPE_OPTIONS.APPLE, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$backgroundBut4, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteCloudDark), _defineProperty(_TOKENS$backgroundBut4, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteCloudDark), _defineProperty(_TOKENS$backgroundBut4, TYPE_OPTIONS.TWITTER, theme.orbit.paletteCloudDark), _TOKENS$backgroundBut4)), _defineProperty(_tokens, TOKENS.colorTextButton, (_TOKENS$colorTextButt = {}, _defineProperty(_TOKENS$colorTextButt, TYPE_OPTIONS.APPLE, theme.orbit.paletteWhite), _defineProperty(_TOKENS$colorTextButt, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt, TYPE_OPTIONS.TWITTER, theme.orbit.paletteInkNormal), _TOKENS$colorTextButt)), _defineProperty(_tokens, TOKENS.colorTextButtonHover, (_TOKENS$colorTextButt2 = {}, _defineProperty(_TOKENS$colorTextButt2, TYPE_OPTIONS.APPLE, theme.orbit.paletteWhite), _defineProperty(_TOKENS$colorTextButt2, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt2, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt2, TYPE_OPTIONS.TWITTER, theme.orbit.paletteInkNormal), _TOKENS$colorTextButt2)), _defineProperty(_tokens, TOKENS.colorTextButtonActive, (_TOKENS$colorTextButt3 = {}, _defineProperty(_TOKENS$colorTextButt3, TYPE_OPTIONS.APPLE, theme.orbit.paletteWhite), _defineProperty(_TOKENS$colorTextButt3, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt3, TYPE_OPTIONS.GOOGLE, theme.orbit.paletteInkNormal), _defineProperty(_TOKENS$colorTextButt3, TYPE_OPTIONS.TWITTER, theme.orbit.paletteInkNormal), _TOKENS$colorTextButt3)), _defineProperty(_tokens, TOKENS.iconColor, (_TOKENS$iconColor = {}, _defineProperty(_TOKENS$iconColor, TYPE_OPTIONS.APPLE, theme.orbit.paletteWhite), _defineProperty(_TOKENS$iconColor, TYPE_OPTIONS.FACEBOOK, theme.orbit.paletteSocialFacebook), _defineProperty(_TOKENS$iconColor, TYPE_OPTIONS.GOOGLE, "currentColor"), _defineProperty(_TOKENS$iconColor, TYPE_OPTIONS.TWITTER, "#00ACEE"), _TOKENS$iconColor)), _defineProperty(_tokens, TOKENS.borderColorButtonFocus, (_TOKENS$borderColorBu = {}, _defineProperty(_TOKENS$borderColorBu, TYPE_OPTIONS.APPLE, convertHexToRgba(theme.orbit.paletteInkLight, 50)), _defineProperty(_TOKENS$borderColorBu, TYPE_OPTIONS.FACEBOOK, convertHexToRgba(theme.orbit.paletteInkLight, 30)), _defineProperty(_TOKENS$borderColorBu, TYPE_OPTIONS.GOOGLE, convertHexToRgba(theme.orbit.paletteInkLight, 50)), _defineProperty(_TOKENS$borderColorBu, TYPE_OPTIONS.TWITTER, convertHexToRgba(theme.orbit.paletteInkLight, 50)), _TOKENS$borderColorBu)), _tokens); return tokens[name][type]; }; export default getSocialButtonTypeToken;