0.7.0 • Published 4 years ago

@dooboo-ui/native-loading-indicator v0.7.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

LoadingIndicator

Npm Version Downloads

Simple LoadingIndicator that overlaps screen indicating that it is doing something.

Props

necessarytypesdefaultoptions
containerStyleStyleProp<ViewStyle>
styleStyleProp<ViewStyle>
colorstring'#969696'
sizestringlargenumber | 'small' | 'large'
imgSourceImageSourcePropType | string

Installation

yarn add @dooboo-ui/native

or

yarn add @dooboo-ui/native-loading-indicator

Usage

Getting started

  • Import

    import { LoadingIndicator } from '@dooboo-ui/native';
    // or
    import LoadingIndicator from '@dooboo-ui/native-loading-indicator';
  • Usage

    • Default

      function Page(props: Props) {
        return <LoadingIndicator />;
      }

      loading_blue loading_purple loading_default loading_pink

    • Image

      function Page(props: Props) {
        return (
          <View>
            <LoadingIndicator
              imgSource="https://user-images.githubusercontent.com/31176502/71331734-ca61d800-2576-11ea-8934-6a260a1d714e.gif"
              containerStyle={{ backgroundColor: 'white' }}
            />
            <Text>Loading ... </Text>
          </View>
        );
      }

      or

      import { ImageName } from '[imgRoute]'
      function Page(props: Props) {
        return (
          <View>
            <LoadingIndicator
              imgSource={ImageName}
              containerStyle={{ backgroundColor: 'white' }}
            />
            <Text>Loading ... </Text>
          </View>
        );
      }

      is_img_true