Update posts in feed to use the theming system

This commit is contained in:
Paul Frazee 2022-12-28 19:20:02 -06:00
parent 8f55e3149e
commit 607203134e
9 changed files with 133 additions and 82 deletions

View file

@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native'
import {StyleSheet, TextStyle} from 'react-native'
import {Theme, TypographyVariant} from './ThemeContext'
// 1 is lightest, 2 is light, 3 is mid, 4 is dark, 5 is darkest
export const colors = {
@ -191,3 +192,13 @@ export const s = StyleSheet.create({
green4: {color: colors.green4},
green5: {color: colors.green5},
})
export function lh(
theme: Theme,
type: TypographyVariant,
height: number,
): TextStyle {
return {
lineHeight: (theme.typography[type].lineHeight || 16) * height,
}
}