UNPKG

1.38 kBJavaScriptView Raw
1import { Platform } from 'react-native';
2const fontConfig = {
3 web: {
4 regular: {
5 fontFamily: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
6 fontWeight: '400'
7 },
8 medium: {
9 fontFamily: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
10 fontWeight: '500'
11 },
12 light: {
13 fontFamily: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
14 fontWeight: '300'
15 },
16 thin: {
17 fontFamily: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
18 fontWeight: '100'
19 }
20 },
21 ios: {
22 regular: {
23 fontFamily: 'System',
24 fontWeight: '400'
25 },
26 medium: {
27 fontFamily: 'System',
28 fontWeight: '500'
29 },
30 light: {
31 fontFamily: 'System',
32 fontWeight: '300'
33 },
34 thin: {
35 fontFamily: 'System',
36 fontWeight: '100'
37 }
38 },
39 default: {
40 regular: {
41 fontFamily: 'sans-serif',
42 fontWeight: 'normal'
43 },
44 medium: {
45 fontFamily: 'sans-serif-medium',
46 fontWeight: 'normal'
47 },
48 light: {
49 fontFamily: 'sans-serif-light',
50 fontWeight: 'normal'
51 },
52 thin: {
53 fontFamily: 'sans-serif-thin',
54 fontWeight: 'normal'
55 }
56 }
57};
58export default function configureFonts(config) {
59 const fonts = Platform.select({ ...fontConfig,
60 ...config
61 });
62 return fonts;
63}
64//# sourceMappingURL=fonts.js.map
\No newline at end of file