UNPKG

mapwize-ui-react-native

Version:

Fully featured and ready to use UI to add Mapwize Indoor Maps and Navigation in your React Native app.

62 lines (59 loc) 1.47 kB
import React from 'react'; import { Image, StyleSheet, TouchableHighlight } from 'react-native'; import icons from '../icons'; const FollowUserButton = ({ style, reduxState: { tooltipMessage, followUserMode, mainColor }, //TODO use proper tooltip hasLocation, disabled, onClick }) => { if (disabled) { return /*#__PURE__*/React.createElement(React.Fragment, null); } return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableHighlight, { style: [style, styles.followUserButton], accessibilityLabel: tooltipMessage, activeOpacity: 0.6, underlayColor: "#DDDDDD", onPress: onClick }, /*#__PURE__*/React.createElement(Image, { source: hasLocation ? icons.GEOLOC_ON : icons.GEOLOC_OFF, style: [styles.image, followUserMode.followUserMode !== 'none' ? { tintColor: mainColor } : { tintColor: 'black' }] }))); }; const styles = StyleSheet.create({ followUserButton: { display: 'flex', justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', borderRadius: 32, alignContent: 'center', alignSelf: 'center', height: 56, width: 56, shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 2, elevation: 2 }, image: { height: 24, width: 24 } }); export default FollowUserButton; //# sourceMappingURL=followUserButton.js.map