UNPKG

react-native-ui-lib

Version:

[![Build Status](https://travis-ci.org/wix/react-native-ui-lib.svg?branch=master)](https://travis-ci.org/wix/react-native-ui-lib) [![npm](https://img.shields.io/npm/v/react-native-ui-lib.svg)](https://www.npmjs.com/package/react-native-ui-lib) [![NPM Down

26 lines (25 loc) 1.1 kB
import React from "react"; import { BaseComponent } from "../../commons"; import View from "../../components/view"; import AnimatedScanner from "../animatedScanner"; import { Colors } from "../../style"; /** * @description: Animated progress bar * @gif:https://media.giphy.com/media/3o752o08oY0oCvOxR6/giphy.gif * @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/animationScreens/ProgressBarScreen.js */ export default class ProgressBar extends BaseComponent { render() { const { height, backgroundColor, progressBackgroundColor } = this.props; const animatedScannerProps = AnimatedScanner.extractOwnProps(this.props); const modifiers = this.extractModifierProps(); return (<View height={height} {...modifiers} style={{ backgroundColor }}> <AnimatedScanner {...animatedScannerProps} backgroundColor={progressBackgroundColor} hideScannerLine/> </View>); } } ProgressBar.displayName = "ProgressBar"; ProgressBar.defaultProps = { backgroundColor: Colors.dark60, progressBackgroundColor: Colors.dark10 };