diff --git a/README.md b/README.md index 60875498f3fbb9bf435fee65e8b05fd96a595146..f7ac83e8eadb80c2eecd52dc57fef1d3fd9ae199 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ A Picker written in pure javascript for cross-platform support. It was most likely an example of how to build a cross-platform Picker Component use [react-native-picker-android](https://github.com/beefe/react-native-picker-android). -###Warn +### Warn if 0.14.2 <= react-native <=0.24 `npm install react-native-picker@2.0.5 --save` if 0.24 < react-native `npm install react-native-picker --save` -####Demo +### Demo - [Date-picker](./demo/date-picker.js) - [Area-picker](./demo/area-picker.js) @@ -20,9 +20,9 @@ if 0.24 < react-native `npm install react-native-picker --save` ![ui2](./doc/ui2.jpg) -###Documentation +### Documentation -####Props +#### Props - style style of picker, you can set width and height of picker in this prop - pickerElevation elevation of picker (for issue https://github.com/beefe/react-native-picker/issues/27) - pickerBtnText string, tool bar's confirm btn text @@ -39,21 +39,21 @@ if 0.24 < react-native `npm install react-native-picker --save` - onPickerCancel function - onValueChange function -####Methods +#### Methods - toggle show or hide picker, default to be hiden - show show picker - hide hide picker - isPickerShow get status of picker, return a boolean -###Usage +### Usage -####Step 1 - install +#### Step 1 - install ``` npm install react-native-picker --save ``` -####Step 2 - import and use in project +#### Step 2 - import and use in project ```javascript import Picker from 'react-native-picker' @@ -70,15 +70,15 @@ if 0.24 < react-native `npm install react-native-picker --save` /> ``` -###Notice +### Notice -####support two modes: +#### support two modes: 1. parallel: such as time picker, wheels have no connection with each other 2. cascade: such as date picker, address picker .etc, when front wheel changed, the behind wheels will all be reset -####parallel: +#### parallel: - single wheel: @@ -98,7 +98,7 @@ if 0.24 < react-native `npm install react-native-picker --save` selectedValue = [1, 5]; ``` -####cascade: +#### cascade: - two wheel