forked from GeekyAnts/NativeBase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPicker.android.js
More file actions
30 lines (25 loc) · 757 Bytes
/
Picker.android.js
File metadata and controls
30 lines (25 loc) · 757 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
import React, { Component } from "react";
import PropTypes from "prop-types";
import createReactClass from "create-react-class";
import { Picker } from "react-native";
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>
);
}
}
PickerNB.Item = createReactClass({
render() {
return <Picker.Item {...this.props()} />;
},
});
PickerNB.propTypes = {
...Picker.propTypes,
};
const StyledPickerNB = connectStyle("NativeBase.PickerNB", {}, mapPropsToStyleNames)(PickerNB);
export { StyledPickerNB as PickerNB };