Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

LoadingIndicator.js 968B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* @flow */
  2. import React, { Component } from 'react';
  3. import { ActivityIndicator } from 'react-native';
  4. import { ColorPalette } from '../../../styles';
  5. type Props = {
  6. /**
  7. * Prop to set the size of the indicator. This is the same as the
  8. * prop of the native component.
  9. */
  10. size: 'large' | 'small'
  11. };
  12. /**
  13. * An animated, large react-native {@link ActivityIndicator} which is considered
  14. * a suitable visualization of long-running processes with indeterminate amounts
  15. * of work to be done.
  16. */
  17. export default class LoadingIndicator extends Component<Props> {
  18. /**
  19. * Implements React's {@link Component#render()}.
  20. *
  21. * @inheritdoc
  22. * @returns {ReactElement}
  23. */
  24. render() {
  25. return (
  26. <ActivityIndicator
  27. animating = { true }
  28. color = { ColorPalette.white }
  29. size = { this.props.size || 'large' }
  30. { ...this.props } />
  31. );
  32. }
  33. }