-
Notifications
You must be signed in to change notification settings - Fork 64
/
App.tsx
49 lines (46 loc) · 1.28 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { AppLoading } from 'expo';
import { useFonts, BalsamiqSans_400Regular } from '@expo-google-fonts/balsamiq-sans';
import {
SourceSansPro_400Regular_Italic,
SourceSansPro_700Bold,
} from '@expo-google-fonts/source-sans-pro';
export default function App() {
let [fontsLoaded] = useFonts({
BalsamiqSans_400Regular,
SourceSansPro_400Regular_Italic,
SourceSansPro_700Bold,
});
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<View style={styles.container}>
<Text style={[styles.text, { fontFamily: 'SourceSansPro_400Regular_Italic' }]}>
Source Sans Pro Italic
</Text>
<Text style={[styles.text, { fontFamily: 'SourceSansPro_700Bold' }]}>
Source Sans Pro Bold
</Text>
<Text style={[styles.text, { fontFamily: 'BalsamiqSans_400Regular' }]}>
Balsamiq Sans Regular
</Text>
<Text style={[styles.text]}>Platform Default</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'center',
},
text: {
fontSize: 24,
color: 'black',
paddingVertical: 10,
},
});