diff options
author | Eric Bailey <git@esb.lol> | 2023-08-24 18:28:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 16:28:26 -0700 |
commit | 462022741d52c92ffe9d32e449bc7dbec3bd78a6 (patch) | |
tree | c2305c044daa5caf10a9723401aeff57c24b88bb /src/view/com/util/Link.tsx | |
parent | 4654a9a45e68eeba289f2f35473fb2af60e754e2 (diff) | |
download | voidsky-462022741d52c92ffe9d32e449bc7dbec3bd78a6.tar.zst |
Use `Pressable` for most links/embeds (#1181)
* delay press on all links * use Pressable for all accessible links
Diffstat (limited to 'src/view/com/util/Link.tsx')
-rw-r--r-- | src/view/com/util/Link.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index fd886fda4..ead85d0b5 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -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> ) }) |