react-native-wheel-pick 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/package.json +1 -1
- package/src/picker.js +1 -0
package/README.md
CHANGED
|
@@ -60,6 +60,9 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
60
60
|
## More Example
|
|
61
61
|
|
|
62
62
|
```jsx
|
|
63
|
+
// Set Text Color
|
|
64
|
+
<Picker textColor="red" />
|
|
65
|
+
|
|
63
66
|
// DatePicker set default select date
|
|
64
67
|
<DatePicker
|
|
65
68
|
style={{ height: 215, width: 300 }}
|
|
@@ -77,20 +80,19 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
77
80
|
|
|
78
81
|
```
|
|
79
82
|
```jsx
|
|
80
|
-
// pickerData also support array of object. (Optional)
|
|
83
|
+
// pickerData also support array of object. (Optional Way)
|
|
81
84
|
|
|
82
|
-
// Way
|
|
85
|
+
// Normal Way
|
|
83
86
|
<Picker
|
|
84
87
|
selectedValue='item4'
|
|
85
88
|
pickerData={['item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7']}
|
|
86
89
|
onValueChange={value => { console.log(value) }}
|
|
87
90
|
/>
|
|
88
91
|
|
|
89
|
-
// Optional Way
|
|
92
|
+
// Optional Way
|
|
90
93
|
// `label` only use for show Text to UI.
|
|
91
94
|
// You cannot get `label` from onValueChange
|
|
92
95
|
<Picker
|
|
93
|
-
style={{ backgroundColor: 'white', width: 300, height: 215 }}
|
|
94
96
|
selectedValue='5765387680'
|
|
95
97
|
pickerData={[
|
|
96
98
|
{ value : '5765387677', label : 'item1' },
|
|
@@ -109,7 +111,6 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
109
111
|
// These is special props for Android. (iOS not work)
|
|
110
112
|
// You can also use these props for DatePicker, too.
|
|
111
113
|
<Picker
|
|
112
|
-
textColor='red'
|
|
113
114
|
textSize={20}
|
|
114
115
|
|
|
115
116
|
selectTextColor='green'
|
|
@@ -139,6 +140,9 @@ You can sponsor me
|
|
|
139
140
|
OR you can fork this project instead.
|
|
140
141
|
|
|
141
142
|
## Release Note
|
|
143
|
+
### 1.2.2 (June 7 2023)
|
|
144
|
+
[iOS]
|
|
145
|
+
- Now iOS can use `textColor`, too. [Add missing color option for iOS](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/38) [@aurotones](https://github.com/aurotones)
|
|
142
146
|
|
|
143
147
|
### 1.2.1 (June 4 2023)
|
|
144
148
|
- Fix typescript warning
|
package/package.json
CHANGED
package/src/picker.js
CHANGED
|
@@ -88,6 +88,7 @@ export default class Picker extends Component {
|
|
|
88
88
|
key={index}
|
|
89
89
|
value={typeof data.value !== 'undefined' ? data.value : data.toString()}
|
|
90
90
|
label={typeof data.label !== 'undefined' ? data.label : data.toString()}
|
|
91
|
+
color={props.textColor}
|
|
91
92
|
/>
|
|
92
93
|
))}
|
|
93
94
|
</WheelCurvedPicker>
|