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.

74 lines (68 loc) 3.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _orbitDesignTokens = require("@kiwicom/orbit-design-tokens"); var _consts = require("../consts"); const getSocialButtonTypeToken = (name, type, theme) => { const tokens = { [_consts.TOKENS.backgroundButton]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudDark, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudDark, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudDark }, [_consts.TOKENS.backgroundButtonHover]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkNormalHover, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormalHover, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormalHover, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormalHover }, [_consts.TOKENS.backgroundButtonActive]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkNormalActive, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormalActive, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormalActive, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormalActive }, [_consts.TOKENS.backgroundButtonFocus]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudDark, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudDark, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudDark }, [_consts.TOKENS.colorTextButton]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkNormal }, [_consts.TOKENS.colorTextButtonHover]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkNormal }, [_consts.TOKENS.colorTextButtonActive]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkNormal, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkNormal }, [_consts.TOKENS.iconColor]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteSocialFacebook, [_consts.TYPE_OPTIONS.GOOGLE]: "currentColor", [_consts.TYPE_OPTIONS.TWITTER]: "#00ACEE" // TODO: add token }, [_consts.TOKENS.borderColorButtonFocus]: { [_consts.TYPE_OPTIONS.APPLE]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkLight, 50), [_consts.TYPE_OPTIONS.FACEBOOK]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkLight, 30), [_consts.TYPE_OPTIONS.GOOGLE]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkLight, 50), [_consts.TYPE_OPTIONS.TWITTER]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkLight, 50) } }; return tokens[name][type]; }; var _default = getSocialButtonTypeToken; exports.default = _default;