@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.
44 lines (34 loc) • 1.62 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _getSocialButtonTypeToken = _interopRequireDefault(require("./getSocialButtonTypeToken"));
var _getSocialButtonBoxShadow = _interopRequireDefault(require("./getSocialButtonBoxShadow"));
var _consts = require("../consts");
var _consts2 = require("../../primitives/ButtonPrimitive/common/consts");
var getButtonStyles = function getButtonStyles(_ref) {
var theme = _ref.theme,
disabled = _ref.disabled,
type = _ref.type;
var wrappedTypeToken = function wrappedTypeToken(name) {
return (0, _getSocialButtonTypeToken.default)(name, type, theme);
};
return {
background: wrappedTypeToken(_consts.TOKENS.backgroundButton),
backgroundHover: wrappedTypeToken(_consts.TOKENS.backgroundButtonHover),
backgroundActive: wrappedTypeToken(_consts.TOKENS.backgroundButtonActive),
backgroundFocus: null,
foreground: wrappedTypeToken(_consts.TOKENS.colorTextButton),
foregroundHover: wrappedTypeToken(_consts.TOKENS.colorTextButtonHover),
foregroundActive: wrappedTypeToken(_consts.TOKENS.colorTextButtonActive),
boxShadow: null,
boxShadowActive: (0, _getSocialButtonBoxShadow.default)(_consts2.BUTTON_STATES.ACTIVE, disabled, theme, type),
boxShadowFocus: (0, _getSocialButtonBoxShadow.default)(_consts2.BUTTON_STATES.FOCUS, disabled, theme, type),
contentAlign: "center",
contentWidth: null
};
};
var _default = getButtonStyles;
exports.default = _default;