@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.
41 lines (39 loc) • 1.55 kB
JavaScript
import convertHexToRgba from "@kiwicom/orbit-design-tokens/lib/convertHexToRgba";
import { TOKENS, TYPES } from "../consts";
const getTypeToken = name => ({
theme,
type
}) => {
const tokens = {
[]: {
[]: theme.orbit.backgroundButtonLinkPrimary,
[]: theme.orbit.backgroundButtonLinkSecondary
},
[]: {
[]: theme.orbit.backgroundButtonLinkPrimaryHover,
[]: theme.orbit.backgroundButtonLinkSecondaryHover
},
[]: {
[]: theme.orbit.backgroundButtonLinkPrimaryHover,
[]: theme.orbit.backgroundButtonLinkSecondaryHover
},
[]: {
[]: theme.orbit.colorTextButtonLinkPrimary,
[]: theme.orbit.colorTextButtonLinkSecondary
},
[]: {
[]: theme.orbit.colorTextButtonLinkPrimaryHover,
[]: theme.orbit.colorTextButtonLinkSecondaryHover
},
[]: {
[]: theme.orbit.colorTextButtonLinkPrimaryActive,
[]: theme.orbit.colorTextButtonLinkSecondaryActive
},
[]: {
[]: convertHexToRgba(theme.orbit.paletteProductNormal, 10),
[]: convertHexToRgba(theme.orbit.paletteInkLight, 10)
}
};
return tokens[name][type];
};
export default getTypeToken;