1.2.0 • Published 4 years ago

@latticeframe/react-native-wheel v1.2.0

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

@latticeframe/react-native-wheel

Getting started

yarn: yarn add @latticeframe/react-native-wheel

npm: npm install @latticeframe/react-native-wheel --save

Mostly automatic installation

react-native link @latticeframe/react-native-wheel

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNWheelPackage; to the imports at the top of the file
  • Add new RNWheelPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    	```
    include ':latticeframe_react-native-wheel' project(':latticeframe_react-native-wheel').projectDir = new File(rootProject.projectDir, '../node_modules/@latticeframe/react-native-wheel/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':latticeframe_react-native-wheel')

Usage

Base usage

import { WheelPanel } from 'react-native-wheel';

...
<WheelPanel
  style={...}
  title='title'
  options={...}
  value={...}
  onValueChange={...}
/>
...

Example

Base usage

base-usage-android base-usage-ios

multi options usage

Properties

style

Type: text styles

Picker panel handle's style, or use children props replace it

visible

Type: boolean

Picker panel is visible

title

Type: string

Picker panel title

options

Type: [[{label: string, value: string | number}]]

One or multip options

value

Type: Array<string | number>

Current value

onValueChange

Type: (value: Array<string | number>) => void

original wheel usage

original wheel usage

original-wheel-usage-android original-wheel-usage-ios

Properties

style

Type: text styles

Wheel's style

options

Type: [{label: string, value: string | number}]

Wheel's options

value

Type: string | number

Current value

onValueChange

Type: (value: string | number) => void

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago