0.7.0 • Published 4 years ago
@dooboo-ui/native-loading-indicator v0.7.0
LoadingIndicator
Simple LoadingIndicator that overlaps screen indicating that it is doing something.
Props
necessary | types | default | options | |
---|---|---|---|---|
containerStyle | StyleProp<ViewStyle> | |||
style | StyleProp<ViewStyle> | |||
color | string | '#969696' | ||
size | string | large | number | 'small' | 'large' | |
imgSource | ImageSourcePropType | 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 />; }
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> ); }