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:
@ -1,5 +1,4 @@
|
||||
import CustomText from '@components/Text'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React from 'react'
|
||||
|
||||
@ -17,9 +16,9 @@ const HeaderCenter = React.memo(
|
||||
<CustomText
|
||||
style={{
|
||||
fontSize: 18,
|
||||
fontWeight: StyleConstants.Font.Weight.Bold,
|
||||
color: inverted ? colors.primaryOverlay : colors.primaryDefault
|
||||
}}
|
||||
fontWeight='Bold'
|
||||
children={content}
|
||||
/>
|
||||
)
|
||||
|
@ -32,10 +32,10 @@ const InstanceInfo = React.memo(
|
||||
<CustomText
|
||||
fontStyle='S'
|
||||
style={{
|
||||
fontWeight: StyleConstants.Font.Weight.Bold,
|
||||
marginBottom: StyleConstants.Spacing.XS,
|
||||
color: colors.primaryDefault
|
||||
}}
|
||||
fontWeight='Bold'
|
||||
children={header}
|
||||
/>
|
||||
{content ? (
|
||||
|
@ -46,8 +46,7 @@ const ParseEmojis = React.memo(
|
||||
text: {
|
||||
color: colors.primaryDefault,
|
||||
fontSize: adaptedFontsize,
|
||||
lineHeight: adaptedLineheight,
|
||||
...(fontBold && { fontWeight: StyleConstants.Font.Weight.Bold })
|
||||
lineHeight: adaptedLineheight
|
||||
},
|
||||
image: {
|
||||
width: adaptedFontsize,
|
||||
@ -58,7 +57,10 @@ const ParseEmojis = React.memo(
|
||||
}, [theme, adaptiveFontsize])
|
||||
|
||||
return (
|
||||
<CustomText style={styles.text}>
|
||||
<CustomText
|
||||
style={styles.text}
|
||||
fontWeight={fontBold ? 'Bold' : undefined}
|
||||
>
|
||||
{emojis ? (
|
||||
content
|
||||
.split(regexEmoji)
|
||||
|
@ -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}
|
||||
|
@ -53,9 +53,9 @@ const TimelineCard = React.memo(({ card }: Props) => {
|
||||
numberOfLines={2}
|
||||
style={{
|
||||
marginBottom: StyleConstants.Spacing.XS,
|
||||
fontWeight: StyleConstants.Font.Weight.Bold,
|
||||
color: colors.primaryDefault
|
||||
}}
|
||||
fontWeight='Bold'
|
||||
testID='title'
|
||||
>
|
||||
{card.title}
|
||||
|
Reference in New Issue
Block a user