react-native-micro-interactions
Version:
Effortlessly enhance your React Native components with subtle micro-interactions and animations.
10 lines (9 loc) • 518 B
JavaScript
;
import { isValidElement } from "react";
const touchableTypes = [require("react-native").TouchableOpacity, require("react-native").TouchableWithoutFeedback, require("react-native").TouchableHighlight, require("react-native").Pressable];
const isComponentTouchable = component => {
if (! /*#__PURE__*/isValidElement(component)) return false;
return touchableTypes.some(TouchableType => component.type === TouchableType);
};
export { isComponentTouchable };
//# sourceMappingURL=utilityFunctions.js.map