Last active
July 28, 2016 15:59
-
-
Save mmazzarolo/8ea0fbf6bf3512f8a90f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @providesModule LoadingSpinner | |
*/ | |
import React, { ActivityIndicatorIOS, Platform, ProgressBarAndroid, StyleSheet } from 'react-native' | |
const IS_ANDROID = Platform.OS === 'android' | |
export default ({ ...props }) => IS_ANDROID | |
? <ProgressBarAndroid style={styles.spinner} {...props} /> | |
: <ActivityIndicatorIOS style={styles.spinner} {...props} /> | |
const styles = StyleSheet.create({ | |
spinner: { | |
flex: 1, | |
alignSelf: 'center', | |
alignItems: 'center', | |
justifyContent: 'center' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment