diff options
Diffstat (limited to 'src/view/com/util')
-rw-r--r-- | src/view/com/util/PostMeta.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/text/RichText.tsx | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index 4dcd74353..4cf6cb00c 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -48,16 +48,16 @@ export function PostMeta(opts: PostMetaOpts) { style={styles.metaItem} href={opts.authorHref} title={opts.authorHandle}> - <Text style={[pal.text, theme.typography.h5]} numberOfLines={1}> + <Text type="h5" style={[pal.text]} numberOfLines={1}> {displayName} {handle ? ( - <Text style={[pal.textLight, theme.typography.h6]}> + <Text type="h6" style={[pal.textLight]}> {handle} </Text> ) : undefined} </Text> </Link> - <Text style={[styles.metaItem, pal.textLight, theme.typography.h6]}> + <Text type="h6" style={[styles.metaItem, pal.textLight]}> · {ago(opts.timestamp)} </Text> <View style={s.flex1} /> 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] |