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.

18 lines (14 loc) 606 B
import { convertHexToRgba } from "@kiwicom/orbit-design-tokens"; import { BUTTON_STATES } from "../../../primitives/ButtonPrimitive/common/consts"; var getButtonBoxShadow = function getButtonBoxShadow(_ref) { var state = _ref.state, disabled = _ref.disabled, theme = _ref.theme, selected = _ref.selected; if (disabled) return null; if (state === BUTTON_STATES.FOCUS) { return "0 0 0 2px ".concat(selected ? convertHexToRgba(theme.orbit.paletteBlueNormal, 30) : convertHexToRgba(theme.orbit.paletteInkLight, 30), "}"); } return null; }; export default getButtonBoxShadow;