We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 713effa commit aa67cb8Copy full SHA for aa67cb8
src/index.tsx
@@ -6,6 +6,7 @@ import {
6
Text,
7
View,
8
StyleSheet,
9
+ GestureResponderEvent,
10
} from 'react-native';
11
12
const useStyles = () => {
@@ -74,7 +75,13 @@ const AttributedText = ({
74
75
}
76
const tokenProps = annotationProps && annotationProps[token.annotation];
77
return (
- <Text {...tokenProps} onPress={() => tokenProps.onPress(token.content)} key={index}>
78
+ <Text
79
+ {...tokenProps}
80
+ onPress={(event: GestureResponderEvent) =>
81
+ tokenProps.onPress({ ...event, content: token.content })
82
+ }
83
+ key={index}
84
+ >
85
{token.content}
86
</Text>
87
);
0 commit comments