@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.
65 lines (62 loc) • 2.9 kB
JavaScript
import { convertHexToRgba } from "@kiwicom/orbit-design-tokens";
import { TOKENS, TYPE_OPTIONS } from "../consts";
const getSocialButtonTypeToken = (name, type, theme) => {
const tokens = {
[]: {
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteCloudDark,
[]: theme.orbit.paletteCloudDark,
[]: theme.orbit.paletteCloudDark
},
[]: {
[]: theme.orbit.paletteInkNormalHover,
[]: theme.orbit.paletteCloudNormalHover,
[]: theme.orbit.paletteCloudNormalHover,
[]: theme.orbit.paletteCloudNormalHover
},
[]: {
[]: theme.orbit.paletteInkNormalActive,
[]: theme.orbit.paletteCloudNormalActive,
[]: theme.orbit.paletteCloudNormalActive,
[]: theme.orbit.paletteCloudNormalActive
},
[]: {
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteCloudDark,
[]: theme.orbit.paletteCloudDark,
[]: theme.orbit.paletteCloudDark
},
[]: {
[]: theme.orbit.paletteWhite,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal
},
[]: {
[]: theme.orbit.paletteWhite,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal
},
[]: {
[]: theme.orbit.paletteWhite,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal,
[]: theme.orbit.paletteInkNormal
},
[]: {
[]: theme.orbit.paletteWhite,
[]: theme.orbit.paletteSocialFacebook,
[]: "currentColor",
[]: "#00ACEE" // TODO: add token
},
[]: {
[]: convertHexToRgba(theme.orbit.paletteInkLight, 50),
[]: convertHexToRgba(theme.orbit.paletteInkLight, 30),
[]: convertHexToRgba(theme.orbit.paletteInkLight, 50),
[]: convertHexToRgba(theme.orbit.paletteInkLight, 50)
}
};
return tokens[name][type];
};
export default getSocialButtonTypeToken;