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.

77 lines (76 loc) 4.08 kB
"use strict"; exports.__esModule = 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.paletteInkDark, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteCloudNormal }, [_consts.TOKENS.backgroundButtonHover]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkDarkHover, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormalHover, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormalHover, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormalHover, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteCloudNormalHover }, [_consts.TOKENS.backgroundButtonActive]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkDarkActive, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormalActive, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormalActive, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormalActive, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteCloudNormalActive }, [_consts.TOKENS.backgroundButtonFocus]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteCloudNormal, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteCloudNormal }, [_consts.TOKENS.colorTextButton]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteInkDark }, [_consts.TOKENS.colorTextButtonHover]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteInkDark }, [_consts.TOKENS.colorTextButtonActive]: { [_consts.TYPE_OPTIONS.APPLE]: theme.orbit.paletteWhite, [_consts.TYPE_OPTIONS.FACEBOOK]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.GOOGLE]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.TWITTER]: theme.orbit.paletteInkDark, [_consts.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteInkDark }, [_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.TYPE_OPTIONS.EMAIL]: theme.orbit.paletteInkDark }, [_consts.TOKENS.borderColorButtonFocus]: { [_consts.TYPE_OPTIONS.APPLE]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkNormal, 50), [_consts.TYPE_OPTIONS.FACEBOOK]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkNormal, 30), [_consts.TYPE_OPTIONS.GOOGLE]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkNormal, 50), [_consts.TYPE_OPTIONS.TWITTER]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkNormal, 50), [_consts.TYPE_OPTIONS.EMAIL]: (0, _orbitDesignTokens.convertHexToRgba)(theme.orbit.paletteInkNormal, 50) } }; return tokens[name][type]; }; var _default = getSocialButtonTypeToken; exports.default = _default;