// src/components/CustomText.tsx import React from 'react'; import { Text, TextProps,…
- User
// src/components/CustomText.tsx import React from 'react'; import { Text, TextProps, StyleSheet, View, ActivityIndicator } from 'react-native'; import { useFonts, Roboto_400Regular, Roboto_700Bold } from '@expo-google-fonts/roboto';
interface CustomTextProps extends TextProps { bold?: boolean; }
const CustomText: React.FC = ({ children, bold, style, ...props }) => { let [fontsLoaded] = useFonts({ Roboto_400Regular, Roboto_700Bold, });
if (!fontsLoaded) { return ( ); }
return ( <Text style={[ bold ? styles.bold : styles.regular, style, ]} {...props} > {children} ); };
const styles = StyleSheet.create({ loadingContainer: { justifyContent: 'center', alignItems: 'center', }, regular: { fontFamily: 'Roboto_400Regular', }, bold: { fontFamily: 'Roboto_700Bold', }, });
export default CustomText; poppins fontunu kullanacağız bu şekilde bir güncelleme yap
- Assistant