2021-03-31 08:16:41 +00:00
|
|
|
import { TextStyle } from 'react-native'
|
|
|
|
import { systemWeights } from 'react-native-typography'
|
|
|
|
|
2021-04-23 11:33:29 +00:00
|
|
|
type FontSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl'
|
2021-03-31 08:16:41 +00:00
|
|
|
export const fontSize: Record<FontSize, TextStyle> = {
|
|
|
|
xs: {
|
|
|
|
fontSize: 12,
|
|
|
|
},
|
|
|
|
sm: {
|
|
|
|
fontSize: 14,
|
|
|
|
},
|
|
|
|
base: {
|
|
|
|
fontSize: 16,
|
|
|
|
},
|
|
|
|
lg: {
|
|
|
|
fontSize: 18,
|
|
|
|
},
|
2021-04-23 11:33:29 +00:00
|
|
|
xl: {
|
|
|
|
fontSize: 20,
|
|
|
|
},
|
2021-03-31 08:16:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type FontWeight = 'regular' | 'semibold' | 'bold'
|
|
|
|
export const fontWeight: Record<FontWeight, TextStyle> = {
|
|
|
|
regular: {
|
|
|
|
...systemWeights.regular,
|
|
|
|
},
|
|
|
|
semibold: {
|
|
|
|
...systemWeights.semibold,
|
|
|
|
},
|
|
|
|
bold: {
|
|
|
|
...systemWeights.bold,
|
2021-08-14 10:59:12 +00:00
|
|
|
},
|
2021-03-31 08:16:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const header: TextStyle = {
|
2021-04-23 11:33:29 +00:00
|
|
|
...fontSize.base,
|
2021-03-31 08:16:41 +00:00
|
|
|
...fontWeight.bold,
|
|
|
|
}
|
|
|
|
|
|
|
|
type Align = 'center'
|
|
|
|
export const align: Record<Align, TextStyle> = {
|
|
|
|
center: {
|
|
|
|
textAlign: 'center',
|
|
|
|
},
|
|
|
|
}
|