1.0.6 • Published 4 years ago

react-native-wheel-array v1.0.6

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

npm version

NPM

React Native Wheel Array Component

A React Native component for generating and displaying interactive array over a circle. Compatible with both iOS and Android.

Table of Contents

  1. Installation
  2. Usage
  3. Props
  4. General Example
  5. Credit

Installation

  1. install react-native-wheel-array and its dependeices
npm install react-native-wheel-array --save

or

yarn add react-native-wheel-array

Usage

Props

PropTypeDescriptionRequiredDefault
valueArrayarrayArray of itemsYes[]
wheelSizenumberDiameter of the wheelNo400
wheelBackgroundstringBackground color of the wheelNotransparent
renderChildComponentfunctionfunction to render array's itemNo() => {return null}
childComponentWidthnumberWidth of the child componentNo20
wheelStyleobjectStyles to override wheelNo{}
marginBordernumberDistance from children object to borderNo10

General Example

The following example will render a wheel with 20 element placed around it

import WheelArray from 'react-native-wheel-array';

const valueArray = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'];
export default class WheelArrayExample extends Component {
	render() {
		return (
			<View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
				<WheelArray
					childComponentWidth={20}
					wheelStyle={{backgroundColor: 'green'}}
					valueArray={valueArray}/>
			</View>
		);
	}
}

Credit

This package is finished thanks to the help of DTP Corporation

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago