Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 16ba3c9

Browse files
tanxvalentinewallace
authored andcommitted
Style margin on spinner from the outside
1 parent a8507c1 commit 16ba3c9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/view/loader-syncing.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { StyleSheet, View } from 'react-native';
2+
import { StyleSheet, View, ViewPropTypes } from 'react-native';
33
import PropTypes from 'prop-types';
44
import Background from '../component/background';
55
import { Text, H1Text, CopyText } from '../component/text';
@@ -9,6 +9,9 @@ import { DownButton } from '../component/button';
99
import { color, font } from '../component/style';
1010

1111
const styles = StyleSheet.create({
12+
spinner: {
13+
marginTop: 40,
14+
},
1215
downBtn: {
1316
margin: 25,
1417
},
@@ -20,6 +23,7 @@ const LoaderSyncingView = ({ store }) => (
2023
<LoadNetworkSpinner
2124
percentage={store.percentSynced}
2225
msg={store.loadingMsg}
26+
style={styles.spinner}
2327
/>
2428
<CopySection />
2529
<DownButton onPress={() => {}} style={styles.downBtn}>
@@ -41,9 +45,6 @@ const size = 80;
4145
const progressWidth = 3;
4246

4347
const loadNetworkStyles = StyleSheet.create({
44-
spinner: {
45-
margin: 20,
46-
},
4748
bolt: {
4849
height: 126 / 4.5,
4950
width: 64 / 4.5,
@@ -56,8 +57,8 @@ const loadNetworkStyles = StyleSheet.create({
5657
},
5758
});
5859

59-
export const LoadNetworkSpinner = ({ percentage, msg }) => (
60-
<View style={loadNetworkStyles.spinner}>
60+
export const LoadNetworkSpinner = ({ percentage, msg, style }) => (
61+
<View style={style}>
6162
<ResizeableSpinner
6263
percentage={percentage}
6364
size={size}
@@ -73,6 +74,7 @@ export const LoadNetworkSpinner = ({ percentage, msg }) => (
7374
LoadNetworkSpinner.propTypes = {
7475
percentage: PropTypes.number.isRequired,
7576
msg: PropTypes.string.isRequired,
77+
style: ViewPropTypes.style,
7678
};
7779

7880
//

0 commit comments

Comments
 (0)