backpack-ui
Version:
Lonely Planet's Components
17 lines (14 loc) • 485 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isElement;
var _react = require('react');
function isElement(props, propName, componentName) {
if (typeof props[propName] !== 'function') {
if ((0, _react.isValidElement)(props[propName])) {
return new Error(ComponentName + ' is not an actual Element');
}
}
} /* eslint-disable */
// https://github.com/souporserious/react-motion-ui-pack/blob/master/src/is-element.js