1
1
import AsyncStorage from '@react-native-community/async-storage' ;
2
2
import { Navigation } from 'react-native-navigation' ;
3
3
import * as Animatable from 'react-native-animatable' ;
4
- import { AnimatableManager , ThemeManager , Constants , Assets , Colors , Typography } from 'react-native-ui-lib' ; // eslint-disable-line
4
+ import {
5
+ AnimatableManager ,
6
+ ThemeManager ,
7
+ Constants ,
8
+ Assets ,
9
+ Colors ,
10
+ Typography ,
11
+ Spacings
12
+ } from 'react-native-ui-lib' ; // eslint-disable-line
5
13
import { registerScreens } from './screens' ;
6
14
7
-
8
15
Assets . loadAssetsGroup ( 'icons.demo' , {
9
16
refresh : require ( './assets/icons/refresh.png' )
10
17
} ) ;
11
18
19
+ Typography . loadTypographies ( {
20
+ h1 : { ...Typography . text40 } ,
21
+ h2 : { ...Typography . text50 } ,
22
+ h3 : { ...Typography . text60 }
23
+ } ) ;
24
+
25
+ Spacings . loadSpacings ( {
26
+ page : Spacings . s5
27
+ } ) ;
28
+
12
29
/** Examples - uncomment when needed */
13
30
// Typography.loadTypographies({
14
31
// h1: {fontSize: 58, fontWeight: '300', lineHeight: 80},
@@ -41,7 +58,6 @@ Assets.loadAssetsGroup('icons.demo', {
41
58
// }
42
59
// });
43
60
44
-
45
61
// AnimatableManager.loadAnimationPresets({
46
62
// preset1: {
47
63
// animation: 'fadeIn',
@@ -68,7 +84,9 @@ Assets.loadAssetsGroup('icons.demo', {
68
84
// },
69
85
// };
70
86
// IMPORTANT! Make uilib's animations available globally for the app's use (option to pass adittional animation definitions)
71
- Animatable . initializeRegistryWithDefinitions ( AnimatableManager . loadAnimationDefinitions ( /** customAnimationsDefinitions */ ) ) ;
87
+ Animatable . initializeRegistryWithDefinitions (
88
+ AnimatableManager . loadAnimationDefinitions ( /** customAnimationsDefinitions */ )
89
+ ) ;
72
90
73
91
function getDefaultNavigationStyle ( ) {
74
92
return {
@@ -91,13 +109,17 @@ function getDefaultNavigationStyle() {
91
109
title : {
92
110
color : Colors . white ,
93
111
fontSize : Typography . text60H . fontSize ,
94
- fontFamily : Constants . isAndroid ? Typography . text65H . fontFamily : '.SFUIText-Heavy' ,
112
+ fontFamily : Constants . isAndroid
113
+ ? Typography . text65H . fontFamily
114
+ : '.SFUIText-Heavy' ,
95
115
fontWeight : 'heavy'
96
116
} ,
97
117
subtitle : {
98
118
color : Colors . white ,
99
119
fontSize : Typography . text80T . fontSize ,
100
- fontFamily : Constants . isAndroid ? Typography . text80 . fontFamily : '.SFUIText-Medium' ,
120
+ fontFamily : Constants . isAndroid
121
+ ? Typography . text80 . fontFamily
122
+ : '.SFUIText-Medium' ,
101
123
fontWeight : 'medium'
102
124
} ,
103
125
backButton : {
0 commit comments