@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.
38 lines (32 loc) • 908 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var getProperty = function getProperty(property, _ref, props) {
var index = _ref.index,
devices = _ref.devices;
var viewport = props && props[devices[index]];
if (viewport && viewport[property]) {
/* if (property === "gap" || property === "rowGap" || property === "columnGap") {
/!*
Any gap can value of "null" or "0" so we don't want to apply it
*!/
if (!gapExists(viewport[property])) {
if (index !== 0) {
return getProperty(property, { index: index - 1, devices }, props);
}
}
} */
return viewport[property];
}
if (index !== 0) {
return getProperty(property, {
index: index - 1,
devices: devices
}, props);
}
return null;
};
var _default = getProperty;
exports.default = _default;