mirror of
https://github.com/expo/react-native-maps.git
synced 2026-11-15 17:39:30 -10:00
This updates the android lib and sample to make it work with RN 0.27.2. Unfortunately Maven Central won't let us upload the artifact with an open dependency on RN (`+` version), so I locked it to 0.27.2 and above. Also had to update some outdated js imports with the new ones.
68 lines
1.3 KiB
JavaScript
68 lines
1.3 KiB
JavaScript
var React = require('react');
|
|
var ReactNative = require('react-native');
|
|
var {
|
|
StyleSheet,
|
|
View,
|
|
Text,
|
|
} = ReactNative;
|
|
|
|
var CustomCallout = React.createClass({
|
|
render() {
|
|
return (
|
|
<View style={[styles.container, this.props.style]}>
|
|
<View style={styles.bubble}>
|
|
<View style={styles.amount}>
|
|
{this.props.children}
|
|
</View>
|
|
</View>
|
|
<View style={styles.arrowBorder} />
|
|
<View style={styles.arrow} />
|
|
</View>
|
|
);
|
|
},
|
|
});
|
|
|
|
var styles = StyleSheet.create({
|
|
container: {
|
|
flexDirection: 'column',
|
|
alignSelf: 'flex-start',
|
|
},
|
|
bubble: {
|
|
width: 140,
|
|
flexDirection: 'row',
|
|
alignSelf: 'flex-start',
|
|
backgroundColor: '#4da2ab',
|
|
paddingHorizontal: 20,
|
|
paddingVertical: 12,
|
|
borderRadius: 6,
|
|
borderColor: '#007a87',
|
|
borderWidth: 0.5,
|
|
},
|
|
dollar: {
|
|
|
|
//color: '#FFFFFF',
|
|
//fontSize: 10,
|
|
},
|
|
amount: {
|
|
flex: 1,
|
|
},
|
|
arrow: {
|
|
backgroundColor: 'transparent',
|
|
borderWidth: 16,
|
|
borderColor: 'transparent',
|
|
borderTopColor: '#4da2ab',
|
|
alignSelf: 'center',
|
|
marginTop: -32,
|
|
},
|
|
arrowBorder: {
|
|
backgroundColor: 'transparent',
|
|
borderWidth: 16,
|
|
borderColor: 'transparent',
|
|
borderTopColor: '#007a87',
|
|
alignSelf: 'center',
|
|
marginTop: -0.5,
|
|
},
|
|
});
|
|
|
|
module.exports = CustomCallout;
|