From df5a8f15427f8efeded692e21585e48df4907c3a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 20 Feb 2024 11:03:04 -0600 Subject: Swap `RichText` (#2934) * Switch to new RT * Allow early exit from links * Build in tracking to text atoms * Clean up FeedSourceCard * Clean up leading after new default * Add deprecated notice --- src/components/RichText.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/RichText.tsx') diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 8aeef9ea1..c72fcabdd 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -1,7 +1,7 @@ import React from 'react' import {RichText as RichTextAPI, AppBskyRichtextFacet} from '@atproto/api' -import {atoms as a, TextStyleProp} from '#/alf' +import {atoms as a, TextStyleProp, flatten} from '#/alf' import {InlineLink} from '#/components/Link' import {Text, TextProps} from '#/components/Typography' import {toShortUrl} from 'lib/strings/url-helpers' @@ -29,7 +29,7 @@ export function RichText({ const [richText, setRichText] = React.useState(() => value instanceof RichTextAPI ? value : new RichTextAPI({text: value}), ) - const styles = [a.leading_normal, style] + const styles = [a.leading_snug, flatten(style)] React.useEffect(() => { if (!resolveFacets) return -- cgit 1.4.1