mapwize-ui-react-native
Version:
Fully featured and ready to use UI to add Mapwize Indoor Maps and Navigation in your React Native app.
75 lines (66 loc) • 1.84 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _icons = _interopRequireDefault(require("../icons"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const FollowUserButton = ({
style,
reduxState: {
tooltipMessage,
followUserMode,
mainColor
},
//TODO use proper tooltip
hasLocation,
disabled,
onClick
}) => {
if (disabled) {
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
}
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableHighlight, {
style: [style, styles.followUserButton],
accessibilityLabel: tooltipMessage,
activeOpacity: 0.6,
underlayColor: "#DDDDDD",
onPress: onClick
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
source: hasLocation ? _icons.default.GEOLOC_ON : _icons.default.GEOLOC_OFF,
style: [styles.image, followUserMode.followUserMode !== 'none' ? {
tintColor: mainColor
} : {
tintColor: 'black'
}]
})));
};
const styles = _reactNative.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
}
});
var _default = FollowUserButton;
exports.default = _default;
//# sourceMappingURL=followUserButton.js.map