0.0.1 • Published 3 years ago

react-native-progress-circle2 v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

license

React Native Progress Circle2

React Native Progress Circles

:white_check_mark: Fixed the following error for latest RN version

:x: Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from deprecated-react-native-prop-types

Features

  • Custom colors
  • Custom size and border radius
  • Light-weight: No other dependencies besides react-native

Installation

yarn add react-native-progress-circle2

or

npm install --save react-native-progress-circle2

Usage

import ProgressCircle from 'react-native-progress-circle2'

render() {
    return (
        <ProgressCircle
            percent={30}
            radius={50}
            borderWidth={8}
            color="#3399FF"
            shadowColor="#999"
            bgColor="#fff"
        >
            <Text style={{ fontSize: 18 }}>{'30%'}</Text>
        </ProgressCircle>
    )
}

Props

NameDescriptionTypeRequiredDefault Value
percentThe percentage used for displaying the progressNumber
radiusThe radius in px of the component (including border)Number
borderWidthThe border width in pxNumber
colorThe border colorString#f00 '#f00'
shadowColorThe background color of the borderString#999 '#999'
bgColorThe inner background color of the componentString#e9e9ef '#e9e9ef'
childrenThe children to render inside this componentNodenull
containerStyleThe custom styling which will be applied to the container of the childrenStylenull
outerCircleStyleThe custom styling which will be applied to the outer circleStylenull

Implementation Details

React Native Progress Circle

License

MIT