diff options
author | Eric Bailey <git@esb.lol> | 2024-07-02 21:34:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 03:34:18 +0100 |
commit | 0598fc2faa813486851f01451818220302f2f97a (patch) | |
tree | 60e63270f0061f7b12443a11967c63c39db00245 /src/components/RichText.tsx | |
parent | 6af78de9eeb3bda01db789f4644f0ff814b1b696 (diff) | |
download | voidsky-0598fc2faa813486851f01451818220302f2f97a.tar.zst |
[D1X] Add interstitials, component tweaks, placeholders (#4697)
* Add interstitials, component tweaks, placeholders * Tweak feed card styles * Port over same fix to ProfileCard * Add browse more link on desktop * Rm Gemfile * Update logContext * Update logContext * Add click metric to cards * Pass through props to ProfileCard.Link * 2-up grid for profile cards on desktop web * Add secondary_inverted button color * Use inverted button color * Adjust follow button layout * Update skeleton * Use round button * Translate
Diffstat (limited to 'src/components/RichText.tsx')
-rw-r--r-- | src/components/RichText.tsx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 9ba44eabe..751177597 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -17,6 +17,19 @@ import {Text, TextProps} from '#/components/Typography' const WORD_WRAP = {wordWrap: 1} +export type RichTextProps = TextStyleProp & + Pick<TextProps, 'selectable'> & { + value: RichTextAPI | string + testID?: string + numberOfLines?: number + disableLinks?: boolean + enableTags?: boolean + authorHandle?: string + onLinkPress?: LinkProps['onPress'] + interactiveStyle?: TextStyle + emojiMultiplier?: number + } + export function RichText({ testID, value, @@ -29,18 +42,7 @@ export function RichText({ onLinkPress, interactiveStyle, emojiMultiplier = 1.85, -}: TextStyleProp & - Pick<TextProps, 'selectable'> & { - value: RichTextAPI | string - testID?: string - numberOfLines?: number - disableLinks?: boolean - enableTags?: boolean - authorHandle?: string - onLinkPress?: LinkProps['onPress'] - interactiveStyle?: TextStyle - emojiMultiplier?: number - }) { +}: RichTextProps) { const richText = React.useMemo( () => value instanceof RichTextAPI ? value : new RichTextAPI({text: value}), |