0.0.2 • Published 5 years ago

react-native-apple-scroll-wheel v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-native-apple-scroll-wheel

The iconic scroll wheel that debuted with the original iPod. Now for React Native.

🚀 Getting Started

Using npm:

npm install --save react-native-apple-scroll-wheel

Using yarn:

yarn add react-native-apple-scroll-wheel

Then you can easily import to your project using:

import AppleScrollWheel from 'react-native-apple-scroll-wheel';

✍️ Example

In the snippet below, we outline the basic interface to the AppleScrollWheel:

<AppleScrollWheel
  value={this.state.value}
  minValue={-720}
  increment={1}
  maxValue={720}
  onChangeValue={value => this.setState({ value })}
/>

For a complete working example, please check out the included example code.

📌 Props

PropTypeDefaultRequired
radiusnumber120No
innerRadiusnumber60No
incrementnumber10No
minValuenumber360 * -2No
maxValuenumber360 * 2No
valuenumber0No
onChangeValuefuncv => nullNo
outerCircleStyleshapeobject Objectstyles.outerCircleStyleNo
innerCircleStyleshapeobject Objectstyles.innerCircleStyleNo
InnerComponentfuncReact.FragmentNo

✌️ License

MIT