Last active
May 19, 2020 15:35
-
-
Save godswillokokon/785e374ad62645b99cc7fdcd2cf07650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Text, } from 'react-native'; | |
import { AppLoading } from 'expo'; | |
import { | |
useFonts, | |
MPLUSRounded1c_100Thin, | |
MPLUSRounded1c_400Regular, | |
MPLUSRounded1c_500Medium, | |
MPLUSRounded1c_700Bold, | |
MPLUSRounded1c_800ExtraBold, | |
MPLUSRounded1c_900Black, | |
} from '@expo-google-fonts/m-plus-rounded-1c'; | |
export const TextFont = ({ children, style }) => { | |
let [fontsLoaded] = useFonts({ | |
MPLUSRounded1c_100Thin, | |
MPLUSRounded1c_400Regular, | |
MPLUSRounded1c_500Medium, | |
MPLUSRounded1c_700Bold, | |
MPLUSRounded1c_800ExtraBold, | |
MPLUSRounded1c_900Black, | |
}); | |
if (!fontsLoaded) { | |
return <AppLoading />; | |
} else { | |
return ( | |
<Text | |
style={{ fontFamily: 'MPLUSRounded1c_400Regular', ...style }}> | |
{children} | |
</Text> | |
); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TextFont as Text } from '../components/Text' | |
render() { | |
return ( | |
<View style={styles.screen}> | |
<Text style={styles.courseSectionLabel}>My Courses</Text> | |
</View> | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment