react-native-scroll-picker-wheel

1.0.2 • Public • Published

react-native-scroll-picker-wheel

a pure js picker, each option item customizable

example

usage

npm install react-native-scroll-picker-wheel --save
import React, {Component} from 'react';
import ScrollPicker from 'react-native-scroll-picker-wheel';

export default class SimpleExample extends Component {

    render() {
        return(
             <ScrollPicker
                  dataSource={[
                       'a',
                       'b',
                       'c',
                       'd',
                  ]}
                  selectedIndex={1}
                  renderItem={(data, index, isSelected) => {
                      //
                  }}
                  onValueChange={(data, selectedIndex) => {
                      //
                  }}
                  wrapperHeight={180}
                  wrapperWidth={150}
                  wrapperBackground={'#FFFFFF'}
                  itemHeight={60}
                  highlightColor={'#d8d8d8'}
                  highlightBorderWidth={2}
                  activeItemColor={'#222121'}
                  itemColor={'#B4B4B4'}
                />
        )
    }
}

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-native-scroll-picker-wheel

      Weekly Downloads

      4

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      55.8 kB

      Total Files

      5

      Last publish

      Collaborators

      • bledip