30 lines
974 B
React
30 lines
974 B
React
// Metro module 5345 (f5346).
|
|
import { useEffect, useMemo, useRef } from "react";
|
|
import { Text, Platform } from "react-native";
|
|
import { GestureObjects } from "./Module5324";
|
|
import { GestureDetector } from "./Module5309";
|
|
const _excluded = ["onPress", "onLongPress", "ref"];
|
|
Platform;
|
|
exports.Text = ({ onPress, onLongPress, ref, ...rest }) => {
|
|
const ref2 = useRef(null);
|
|
const memo2 = useMemo(() => GestureObjects.Native().runOnJS(true), []);
|
|
const memo = useMemo(() => {
|
|
const handler = (a0) => {
|
|
ref2.current = a0;
|
|
if (ref) {
|
|
if (typeof ref === "function") {
|
|
ref(a0);
|
|
} else {
|
|
ref.current = a0;
|
|
}
|
|
}
|
|
};
|
|
handler.rngh = true;
|
|
return handler;
|
|
}, [ref]);
|
|
useEffect(() => {}, []);
|
|
return !onPress && !onLongPress ? <Text ref={memo} {...rest} /> : <GestureDetector gesture={memo2}>
|
|
<Text onPress={onPress} onLongPress={onLongPress} ref={memo} {...rest} />
|
|
</GestureDetector>;
|
|
};
|