react-native-micro-interactions
Version:
Effortlessly enhance your React Native components with subtle micro-interactions and animations.
14 lines (13 loc) • 645 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isComponentTouchable = void 0;
var _react = require("react");
const touchableTypes = [require("react-native").TouchableOpacity, require("react-native").TouchableWithoutFeedback, require("react-native").TouchableHighlight, require("react-native").Pressable];
const isComponentTouchable = component => {
if (! /*#__PURE__*/(0, _react.isValidElement)(component)) return false;
return touchableTypes.some(TouchableType => component.type === TouchableType);
};
exports.isComponentTouchable = isComponentTouchable;
//# sourceMappingURL=utilityFunctions.js.map