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.

26 lines (20 loc) 778 B
import resolveFocusColor from "./resolveFocusColor"; import resolveAccentColor from "./resolveAccentColor"; import { TYPES } from "../../consts"; var resolveFillColor = function resolveFillColor(_ref) { var type = _ref.type, theme = _ref.theme, selected = _ref.selected, focus = _ref.focus; if (focus) { if (type === TYPES.UNAVAILABLE) return ""; if (!selected) { return resolveAccentColor; } return resolveFocusColor; } if (type === TYPES.LEGROOM) return selected ? theme.orbit.paletteBlueNormal : theme.orbit.paletteBlueLight; if (type === TYPES.UNAVAILABLE) return theme.orbit.paletteCloudLight; return selected ? theme.orbit.paletteProductNormal : theme.orbit.paletteProductLight; }; export default resolveFillColor;