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.

37 lines 1.66 kB
import { TOKENS, TYPES } from "../consts"; const getButtonLinkTypeToken = (name, type, theme) => { const tokens = { [TOKENS.background]: { [TYPES.PRIMARY]: theme.orbit.backgroundButtonLinkPrimary, [TYPES.SECONDARY]: theme.orbit.backgroundButtonLinkSecondary, [TYPES.CRITICAL]: theme.orbit.backgroundButtonLinkCritical }, [TOKENS.backgroundHover]: { [TYPES.PRIMARY]: theme.orbit.backgroundButtonLinkPrimaryHover, [TYPES.SECONDARY]: theme.orbit.backgroundButtonLinkSecondaryHover, [TYPES.CRITICAL]: theme.orbit.backgroundButtonLinkCriticalHover }, [TOKENS.backgroundActive]: { [TYPES.PRIMARY]: theme.orbit.backgroundButtonLinkPrimaryActive, [TYPES.SECONDARY]: theme.orbit.backgroundButtonLinkSecondaryActive, [TYPES.CRITICAL]: theme.orbit.backgroundButtonLinkCriticalActive }, [TOKENS.foreground]: { [TYPES.PRIMARY]: theme.orbit.colorTextButtonLinkPrimary, [TYPES.SECONDARY]: theme.orbit.colorTextButtonLinkSecondary, [TYPES.CRITICAL]: theme.orbit.colorTextButtonLinkCritical }, [TOKENS.foregroundHover]: { [TYPES.PRIMARY]: theme.orbit.colorTextButtonLinkPrimaryHover, [TYPES.SECONDARY]: theme.orbit.colorTextButtonLinkSecondaryHover, [TYPES.CRITICAL]: theme.orbit.colorTextButtonLinkCriticalHover }, [TOKENS.foregroundActive]: { [TYPES.PRIMARY]: theme.orbit.colorTextButtonLinkPrimaryActive, [TYPES.SECONDARY]: theme.orbit.colorTextButtonLinkSecondaryActive, [TYPES.CRITICAL]: theme.orbit.colorTextButtonLinkCriticalActive } }; return tokens[name][type]; }; export default getButtonLinkTypeToken;