Use Pressable for most links/embeds (#1181)

* delay press on all links

* use Pressable for all accessible links
This commit is contained in:
Eric Bailey 2023-08-24 18:28:26 -05:00 committed by GitHub
parent 4654a9a45e
commit 462022741d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 33 deletions

View file

@ -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>
)
})