diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-23 14:53:33 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-23 14:53:33 -0600 |
commit | 4eb8bc1249ccf6afaa0c77695057a13379cf1aa1 (patch) | |
tree | 788f4d0b0107ff521388f4fc8f2ff413f7a95f18 /src/view/com/util/RichText.tsx | |
parent | 2b37b6549b6cb17db582a81a2bdca8316b1e4861 (diff) | |
download | voidsky-4eb8bc1249ccf6afaa0c77695057a13379cf1aa1.tar.zst |
Detect links in profile bios
Diffstat (limited to 'src/view/com/util/RichText.tsx')
-rw-r--r-- | src/view/com/util/RichText.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/view/com/util/RichText.tsx b/src/view/com/util/RichText.tsx index a67f90a63..8b4e6a50a 100644 --- a/src/view/com/util/RichText.tsx +++ b/src/view/com/util/RichText.tsx @@ -15,10 +15,12 @@ export function RichText({ text, entities, style, + numberOfLines, }: { text: string entities?: Entity[] style?: StyleProp<TextStyle> + numberOfLines?: number }) { if (!entities?.length) { return <Text style={style}>{text}</Text> @@ -55,7 +57,11 @@ export function RichText({ } key++ } - return <Text style={style}>{els}</Text> + return ( + <Text style={style} numberOfLines={numberOfLines}> + {els} + </Text> + ) } function sortByIndex(a: Entity, b: Entity) { |