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.

31 lines (27 loc) 1.24 kB
import getSocialButtonTypeToken from "./getSocialButtonTypeToken"; import getSocialButtonBoxShadow from "./getSocialButtonBoxShadow"; import { TOKENS } from "../consts"; import { BUTTON_STATES } from "../../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 getSocialButtonTypeToken(name, type, theme); }; return { background: wrappedTypeToken(TOKENS.backgroundButton), backgroundHover: wrappedTypeToken(TOKENS.backgroundButtonHover), backgroundActive: wrappedTypeToken(TOKENS.backgroundButtonActive), backgroundFocus: null, foreground: wrappedTypeToken(TOKENS.colorTextButton), foregroundHover: wrappedTypeToken(TOKENS.colorTextButtonHover), foregroundActive: wrappedTypeToken(TOKENS.colorTextButtonActive), boxShadow: null, boxShadowActive: getSocialButtonBoxShadow(BUTTON_STATES.ACTIVE, disabled, theme, type), boxShadowFocus: getSocialButtonBoxShadow(BUTTON_STATES.FOCUS, disabled, theme, type), contentAlign: "center", contentWidth: null }; }; export default getButtonStyles;