1 | import React from 'react';
|
2 | import { StyleSheet, ActivityIndicator, View, } from 'react-native';
|
3 | import { withTheme } from '../config';
|
4 | const DialogLoading = ({ loadingStyle, loadingProps, theme, }) => {
|
5 | var _a, _b;
|
6 | return (<View style={styles.loadingView}>
|
7 | <ActivityIndicator style={StyleSheet.flatten([styles.loading, loadingStyle])} color={(_a = loadingProps.color) !== null && _a !== void 0 ? _a : theme.colors.primary} size={(_b = loadingProps.size) !== null && _b !== void 0 ? _b : 'large'} testID="Dialog__Loading" {...loadingProps}/>
|
8 | </View>);
|
9 | };
|
10 | DialogLoading.defaultProps = {
|
11 | loadingProps: { size: 'large' },
|
12 | };
|
13 | const styles = StyleSheet.create({
|
14 | loading: {
|
15 | marginVertical: 20,
|
16 | },
|
17 | loadingView: {
|
18 | flexDirection: 'row',
|
19 | justifyContent: 'center',
|
20 | alignItems: 'center',
|
21 | },
|
22 | });
|
23 | export default withTheme(DialogLoading, 'DialogLoading');
|
24 |
|
\ | No newline at end of file |