File tree 2 files changed +27
-15
lines changed
src/components/Tooltip/BaseGenericTooltip 2 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,18 @@ function BaseGenericTooltip({
115
115
) ;
116
116
}
117
117
118
+ const contentWithOrWithoutPressable = isEducationTooltip ? (
119
+ < PressableWithoutFeedback
120
+ onPress = { onTooltipPress }
121
+ role = { CONST . ROLE . TOOLTIP }
122
+ accessibilityLabel = { CONST . ROLE . TOOLTIP }
123
+ >
124
+ { content }
125
+ </ PressableWithoutFeedback >
126
+ ) : (
127
+ content
128
+ ) ;
129
+
118
130
return (
119
131
< Portal hostName = { shouldTeleportPortalToModalLayer ? 'modal' : undefined } >
120
132
{ shouldUseOverlay && < TransparentOverlay onPress = { onHideTooltip } /> }
@@ -135,13 +147,7 @@ function BaseGenericTooltip({
135
147
setWrapperMeasuredHeight ( height ) ;
136
148
} }
137
149
>
138
- < PressableWithoutFeedback
139
- onPress = { onTooltipPress }
140
- role = { CONST . ROLE . TOOLTIP }
141
- accessibilityLabel = { CONST . ROLE . TOOLTIP }
142
- >
143
- { content }
144
- </ PressableWithoutFeedback >
150
+ { contentWithOrWithoutPressable }
145
151
< View style = { pointerWrapperStyle } >
146
152
< View style = { pointerStyle } />
147
153
</ View >
Original file line number Diff line number Diff line change @@ -140,6 +140,19 @@ function BaseGenericTooltip({
140
140
) ;
141
141
}
142
142
143
+ const contentWithOrWithoutPressable = isEducationTooltip ? (
144
+ < PressableWithoutFeedback
145
+ onPress = { onTooltipPress }
146
+ ref = { pressableRef }
147
+ role = { CONST . ROLE . TOOLTIP }
148
+ accessibilityLabel = { CONST . ROLE . TOOLTIP }
149
+ >
150
+ { content }
151
+ </ PressableWithoutFeedback >
152
+ ) : (
153
+ content
154
+ ) ;
155
+
143
156
const body = document . querySelector ( 'body' ) ;
144
157
145
158
if ( ! body ) {
@@ -153,14 +166,7 @@ function BaseGenericTooltip({
153
166
ref = { viewRef ( rootWrapper ) }
154
167
style = { [ rootWrapperStyle , animationStyle ] }
155
168
>
156
- < PressableWithoutFeedback
157
- onPress = { onTooltipPress }
158
- ref = { pressableRef }
159
- role = { CONST . ROLE . TOOLTIP }
160
- accessibilityLabel = { CONST . ROLE . TOOLTIP }
161
- >
162
- { content }
163
- </ PressableWithoutFeedback >
169
+ { contentWithOrWithoutPressable }
164
170
< View style = { pointerWrapperStyle } >
165
171
< View style = { pointerStyle } />
166
172
</ View >
You can’t perform that action at this time.
0 commit comments