diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-30 12:19:45 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-30 12:19:45 -0600 |
commit | 55ca7dcce1acba1440f22c20d1e1b4611aebd73d (patch) | |
tree | c34dc29e6ae3eb31865a76f8d662c1e8f8ffb101 /src/view/com/util/text | |
parent | 55500e2f66d5f30f1aedf63d4355a6b7568d4552 (diff) | |
download | voidsky-55ca7dcce1acba1440f22c20d1e1b4611aebd73d.tar.zst |
Update threads to use design system
Diffstat (limited to 'src/view/com/util/text')
-rw-r--r-- | src/view/com/util/text/RichText.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/com/util/text/RichText.tsx b/src/view/com/util/text/RichText.tsx index 830294d3a..2a42d26ae 100644 --- a/src/view/com/util/text/RichText.tsx +++ b/src/view/com/util/text/RichText.tsx @@ -29,7 +29,7 @@ export function RichText({ }) { const theme = useTheme() const pal = usePalette('default') - const lineHeightStyle = lh(theme, 'body1', 1.2) + const lineHeightStyle = lh(theme, type, 1.2) if (!entities?.length) { if (/^\p{Extended_Pictographic}+$/u.test(text) && text.length <= 5) { style = { @@ -38,7 +38,11 @@ export function RichText({ } return <Text style={[style, pal.text]}>{text}</Text> } - return <Text style={[style, pal.text, lineHeightStyle]}>{text}</Text> + return ( + <Text type={type} style={[style, pal.text, lineHeightStyle]}> + {text} + </Text> + ) } if (!style) style = [] else if (!Array.isArray(style)) style = [style] |