Files
Dan Tamas dbf746d66c Unify eslint with react-community standard (#2862)
* move eslitnt rules to @react-native-community/eslint-config

* gitignore VSCode workspace settings

* update eslint related packages and remove airbnb ones

* add .prettierrc config

* automated fix by eslint and prettier

* remove custom eslint rules

* remove never reported elint exceptions

* remove unlimited eslint-disable exceptions

* fix  formating

* fix inline styles

* fix react to 16.8.3 and remove babel-preset-react-native
2019-05-15 15:08:19 +02:00

47 lines
1.0 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import { StyleSheet, ViewPropTypes, View } from 'react-native';
import decorateMapComponent, {
SUPPORTED,
NOT_SUPPORTED,
} from './decorateMapComponent';
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
const viewPropTypes = ViewPropTypes || View.propTypes;
const propTypes = {
...viewPropTypes,
onPress: PropTypes.func,
};
const defaultProps = {};
class MapCalloutSubview extends React.Component {
render() {
const AIRMapCalloutSubview = this.getAirComponent();
return (
<AIRMapCalloutSubview
{...this.props}
style={[styles.calloutSubview, this.props.style]}
/>
);
}
}
MapCalloutSubview.propTypes = propTypes;
MapCalloutSubview.defaultProps = defaultProps;
const styles = StyleSheet.create({
calloutSubview: {},
});
export default decorateMapComponent(MapCalloutSubview, {
componentType: 'CalloutSubview',
providers: {
google: {
ios: SUPPORTED,
android: NOT_SUPPORTED,
},
},
});