about summary refs log tree commit diff
path: root/src/view/com/util/text/RichText.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-18 11:15:40 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-18 11:15:40 -0600
commit77580ab6a4df8e233e5b1a9b166eebbca9bdc80f (patch)
tree964991f62d70de001c2f7ba08c0a6c135181bc3b /src/view/com/util/text/RichText.tsx
parentdf4acbd683fb66c469c25915e875a8bcd2d83971 (diff)
downloadvoidsky-77580ab6a4df8e233e5b1a9b166eebbca9bdc80f.tar.zst
Rework all typography
Diffstat (limited to 'src/view/com/util/text/RichText.tsx')
-rw-r--r--src/view/com/util/text/RichText.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/com/util/text/RichText.tsx b/src/view/com/util/text/RichText.tsx
index 2a42d26ae..a7bc92a45 100644
--- a/src/view/com/util/text/RichText.tsx
+++ b/src/view/com/util/text/RichText.tsx
@@ -15,21 +15,23 @@ type Entity = {
 }
 
 export function RichText({
-  type = 'body1',
+  type = 'md',
   text,
   entities,
+  lineHeight = 1.2,
   style,
   numberOfLines,
 }: {
   type?: TypographyVariant
   text: string
   entities?: Entity[]
+  lineHeight?: number
   style?: StyleProp<TextStyle>
   numberOfLines?: number
 }) {
   const theme = useTheme()
   const pal = usePalette('default')
-  const lineHeightStyle = lh(theme, type, 1.2)
+  const lineHeightStyle = lh(theme, type, lineHeight)
   if (!entities?.length) {
     if (/^\p{Extended_Pictographic}+$/u.test(text) && text.length <= 5) {
       style = {