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

@ -7,12 +7,11 @@ import {
AccessibilityProps,
Pressable,
StyleProp,
StyleSheet,
Text,
View,
ViewStyle
} from 'react-native'
import { Flow } from 'react-native-animated-spinkit'
import CustomText from './Text'
export interface Props {
accessibilityLabel?: AccessibilityProps['accessibilityLabel']
@ -116,7 +115,7 @@ const Button: React.FC<Props> = ({
case 'text':
return (
<>
<Text
<CustomText
style={{
color: mainColor,
fontSize:
@ -146,8 +145,10 @@ const Button: React.FC<Props> = ({
busy: loading
}}
style={[
styles.button,
{
borderRadius: 100,
justifyContent: 'center',
alignItems: 'center',
borderWidth: overlay ? 0 : 1,
borderColor: mainColor,
backgroundColor: colorBackground,
@ -170,12 +171,4 @@ const Button: React.FC<Props> = ({
)
}
const styles = StyleSheet.create({
button: {
borderRadius: 100,
justifyContent: 'center',
alignItems: 'center'
}
})
export default Button