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.

30 lines (29 loc) 1.34 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; exports.__esModule = true; exports.default = void 0; var _consts = require("../consts"); var _getButtonLinkTypeToken = _interopRequireDefault(require("./getButtonLinkTypeToken")); const getButtonLinkIconForeground = ({ type, theme, compact }) => { const wrappedTypeReturn = usedType => ({ foreground: (0, _getButtonLinkTypeToken.default)(_consts.TOKENS.foreground, type, theme), foregroundHover: (0, _getButtonLinkTypeToken.default)(_consts.TOKENS.foregroundHover, usedType, theme), foregroundActive: (0, _getButtonLinkTypeToken.default)(_consts.TOKENS.foregroundActive, usedType, theme), foregroundFocus: (0, _getButtonLinkTypeToken.default)(_consts.TOKENS.foregroundActive, usedType, theme) }); if (compact && type === _consts.TYPES.SECONDARY) { return { foreground: (0, _getButtonLinkTypeToken.default)(_consts.TOKENS.foreground, type, theme), foregroundHover: theme.orbit.colorTextButtonLinkSecondaryCompactHover, foregroundActive: theme.orbit.colorTextButtonLinkSecondaryCompactHover, foregroundFocus: theme.orbit.colorTextButtonLinkSecondaryCompactActive }; } return wrappedTypeReturn(type); }; var _default = getButtonLinkIconForeground; exports.default = _default;