From d9dbbe73dceed1b9b02a1b561ef489e6c1bf9cba Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 28 Feb 2024 17:34:40 -0600 Subject: [PATCH] Hackfix --- src/components/RichText.tsx | 81 ++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 3d5f08026f..5482234b15 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -3,7 +3,7 @@ import {RichText as RichTextAPI, AppBskyRichtextFacet} from '@atproto/api' import {useLingui} from '@lingui/react' import {msg} from '@lingui/macro' -import {atoms as a, TextStyleProp, flatten, useTheme, web, native} from '#/alf' +import {atoms as a, TextStyleProp, flatten, useTheme, web} from '#/alf' import {InlineLink} from '#/components/Link' import {Text, TextProps} from '#/components/Typography' import {toShortUrl} from 'lib/strings/url-helpers' @@ -174,48 +174,57 @@ function RichTextTag({ control.open() }, [control]) + const styles = [ + style, + { + pointerEvents: 'auto', + color: t.palette.primary_500, + }, + web({ + cursor: 'pointer', + }), + (hovered || focused || pressed) && { + ...web({outline: 0}), + textDecorationLine: 'underline', + textDecorationColor: t.palette.primary_500, + }, + ] + /* * N.B. On web, this is wrapped in another pressable comopnent with a11y - * labels, etc. That's why only some of these props are applied here. + * labels, etc. Hence the conditional render. */ return ( - - {tag} - + {isNative ? ( + + {tag} + + ) : ( + + {tag} + + )} )