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

Using new text component

Need to use global accessibility checks rather than per text component which is not efficient
This commit is contained in:
Zhiyuan Zheng
2022-05-07 00:52:32 +02:00
parent 8caf315894
commit 7c48c61c99
60 changed files with 1302 additions and 1494 deletions

View File

@ -1,7 +1,7 @@
import CustomText from '@components/Text'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { StyleSheet, Text } from 'react-native'
export interface Props {
content: string
@ -14,11 +14,12 @@ const HeaderCenter = React.memo(
const { colors } = useTheme()
return (
<Text
style={[
styles.text,
{ color: inverted ? colors.primaryOverlay : colors.primaryDefault }
]}
<CustomText
style={{
fontSize: 18,
fontWeight: StyleConstants.Font.Weight.Bold,
color: inverted ? colors.primaryOverlay : colors.primaryDefault
}}
children={content}
/>
)
@ -26,11 +27,4 @@ const HeaderCenter = React.memo(
(prev, next) => prev.content === next.content
)
const styles = StyleSheet.create({
text: {
fontSize: 18,
fontWeight: StyleConstants.Font.Weight.Bold
}
})
export default HeaderCenter