@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.
19 lines (15 loc) • 498 B
JavaScript
import { convertHexToRgba } from "@kiwicom/orbit-design-tokens";
import { BUTTON_STATES } from "../../../primitives/ButtonPrimitive/common/consts";
const getButtonBoxShadow = ({
state,
disabled,
theme,
selected
}) => {
if (disabled) return null;
if (state === BUTTON_STATES.FOCUS) {
return `0 0 0 2px ${selected ? convertHexToRgba(theme.orbit.paletteBlueNormal, 30) : convertHexToRgba(theme.orbit.paletteInkLight, 30)}}`;
}
return null;
};
export default getButtonBoxShadow;