forked from GeekyAnts/NativeBase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPicker.js
More file actions
37 lines (31 loc) · 907 Bytes
/
Picker.js
File metadata and controls
37 lines (31 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* eslint-disable react/prefer-stateless-function */
/* eslint-disable react/prefer-es6-class */
import React, { Component } from 'react';
import createReactClass from 'create-react-class';
import { Picker } from '@react-native-picker/picker';
import { connectStyle } from 'native-base-shoutem-theme';
import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
export default class PickerNB extends Component {
render() {
return (
<Picker ref={c => (this._root = c)} {...this.props}>
{this.props.children}
</Picker>
);
}
}
// eslint-disable-next-line react/no-multi-comp
PickerNB.Item = createReactClass({
render() {
return <Picker.Item {...this.props} />;
}
});
PickerNB.propTypes = {
...Picker.propTypes
};
const StyledPickerNB = connectStyle(
'NativeBase.PickerNB',
{},
mapPropsToStyleNames
)(PickerNB);
export { StyledPickerNB as PickerNB };