Use Pressable
for most links/embeds (#1181)
* delay press on all links * use Pressable for all accessible links
This commit is contained in:
parent
4654a9a45e
commit
462022741d
6 changed files with 15 additions and 33 deletions
|
@ -9,8 +9,9 @@ import {
|
|||
TextProps,
|
||||
View,
|
||||
ViewStyle,
|
||||
TouchableOpacity,
|
||||
Pressable,
|
||||
TouchableWithoutFeedback,
|
||||
TouchableOpacity,
|
||||
} from 'react-native'
|
||||
import {
|
||||
useLinkProps,
|
||||
|
@ -112,7 +113,7 @@ export const Link = observer(function Link({
|
|||
}
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
<Pressable
|
||||
testID={testID}
|
||||
style={style}
|
||||
onPress={onPress}
|
||||
|
@ -122,7 +123,7 @@ export const Link = observer(function Link({
|
|||
href={asAnchor ? sanitizeUrl(href) : undefined}
|
||||
{...props}>
|
||||
{children ? children : <Text>{title || 'link'}</Text>}
|
||||
</TouchableOpacity>
|
||||
</Pressable>
|
||||
)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue