1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix font weight

This commit is contained in:
Zhiyuan Zheng
2022-05-10 23:19:26 +02:00
parent 282ba1267d
commit c105b36b3d
10 changed files with 31 additions and 54 deletions

View File

@ -23,7 +23,7 @@ const CustomText: React.FC<Props & TextProps> = ({
style,
fontStyle,
fontSize,
fontWeight = 'Normal',
fontWeight,
lineHeight,
...rest
}) => {
@ -46,9 +46,11 @@ const CustomText: React.FC<Props & TextProps> = ({
})
},
{
fontWeight: boldTextEnabled
? BoldMapping[fontWeight]
: StyleConstants.Font.Weight[fontWeight]
fontWeight: fontWeight
? boldTextEnabled
? BoldMapping[fontWeight]
: StyleConstants.Font.Weight[fontWeight]
: undefined
}
]}
{...rest}