@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.
42 lines (33 loc) • 1.51 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
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");
const getButtonStyles = ({
theme,
disabled,
type
}) => {
const wrappedTypeToken = name => (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;