@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.
20 lines (16 loc) • 415 B
JavaScript
var getProperty = function getProperty(property, _ref, props) {
var index = _ref.index,
devices = _ref.devices;
var viewport = props && props[devices[index]];
if (viewport && viewport[property]) {
return viewport[property];
}
if (index !== 0) {
return getProperty(property, {
index: index - 1,
devices: devices
}, props);
}
return null;
};
export default getProperty;