mirror of
https://github.com/expo/react-native-maps.git
synced 2026-11-15 17:39:30 -10:00
46 lines
811 B
JavaScript
46 lines
811 B
JavaScript
|
|
var React = require('react');
|
|
var {
|
|
PropTypes,
|
|
} = React;
|
|
|
|
var ReactNative = require('react-native');
|
|
var {
|
|
View,
|
|
NativeMethodsMixin,
|
|
requireNativeComponent,
|
|
StyleSheet,
|
|
} = ReactNative;
|
|
|
|
var MapCallout = React.createClass({
|
|
mixins: [NativeMethodsMixin],
|
|
|
|
propTypes: {
|
|
...View.propTypes,
|
|
tooltip: PropTypes.bool,
|
|
onPress: PropTypes.func,
|
|
},
|
|
|
|
getDefaultProps: function() {
|
|
return {
|
|
tooltip: false,
|
|
};
|
|
},
|
|
|
|
render: function() {
|
|
return <AIRMapCallout {...this.props} style={[styles.callout, this.props.style]} />;
|
|
},
|
|
});
|
|
|
|
var styles = StyleSheet.create({
|
|
callout: {
|
|
position: 'absolute',
|
|
//flex: 0,
|
|
//backgroundColor: 'transparent',
|
|
},
|
|
});
|
|
|
|
var AIRMapCallout = requireNativeComponent('AIRMapCallout', MapCallout);
|
|
|
|
module.exports = MapCallout;
|