Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BasicLoadingScreen.js 936B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import * as React from 'react';
  3. import {View} from 'react-native';
  4. import {ActivityIndicator, withTheme} from 'react-native-paper';
  5. import type {CustomThemeType} from '../../managers/ThemeManager';
  6. /**
  7. * Component used to display a header button
  8. *
  9. * @param props Props to pass to the component
  10. * @return {*}
  11. */
  12. function BasicLoadingScreen(props: {
  13. theme: CustomThemeType,
  14. isAbsolute: boolean,
  15. }): React.Node {
  16. const {theme, isAbsolute} = props;
  17. const {colors} = theme;
  18. let position;
  19. if (isAbsolute != null && isAbsolute) position = 'absolute';
  20. return (
  21. <View
  22. style={{
  23. backgroundColor: colors.background,
  24. position,
  25. top: 0,
  26. right: 0,
  27. width: '100%',
  28. height: '100%',
  29. justifyContent: 'center',
  30. }}>
  31. <ActivityIndicator animating size="large" color={colors.primary} />
  32. </View>
  33. );
  34. }
  35. export default withTheme(BasicLoadingScreen);