Skip to content

Commit 2ff0412

Browse files
committed
Set foundation presets for our demo app
1 parent 7a6e86f commit 2ff0412

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

demo/src/demoApp.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
import AsyncStorage from '@react-native-community/async-storage';
22
import {Navigation} from 'react-native-navigation';
33
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
513
import {registerScreens} from './screens';
614

7-
815
Assets.loadAssetsGroup('icons.demo', {
916
refresh: require('./assets/icons/refresh.png')
1017
});
1118

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+
1229
/** Examples - uncomment when needed */
1330
// Typography.loadTypographies({
1431
// h1: {fontSize: 58, fontWeight: '300', lineHeight: 80},
@@ -41,7 +58,6 @@ Assets.loadAssetsGroup('icons.demo', {
4158
// }
4259
// });
4360

44-
4561
// AnimatableManager.loadAnimationPresets({
4662
// preset1: {
4763
// animation: 'fadeIn',
@@ -68,7 +84,9 @@ Assets.loadAssetsGroup('icons.demo', {
6884
// },
6985
// };
7086
// 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+
);
7290

7391
function getDefaultNavigationStyle() {
7492
return {
@@ -91,13 +109,17 @@ function getDefaultNavigationStyle() {
91109
title: {
92110
color: Colors.white,
93111
fontSize: Typography.text60H.fontSize,
94-
fontFamily: Constants.isAndroid ? Typography.text65H.fontFamily : '.SFUIText-Heavy',
112+
fontFamily: Constants.isAndroid
113+
? Typography.text65H.fontFamily
114+
: '.SFUIText-Heavy',
95115
fontWeight: 'heavy'
96116
},
97117
subtitle: {
98118
color: Colors.white,
99119
fontSize: Typography.text80T.fontSize,
100-
fontFamily: Constants.isAndroid ? Typography.text80.fontFamily : '.SFUIText-Medium',
120+
fontFamily: Constants.isAndroid
121+
? Typography.text80.fontFamily
122+
: '.SFUIText-Medium',
101123
fontWeight: 'medium'
102124
},
103125
backButton: {

0 commit comments

Comments
 (0)