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.

88 lines (86 loc) 2.36 kB
import React from 'react'; import { StyleSheet, View } from 'react-native'; import BottomViewDirection from './bottomViewDirection'; import PlaceDetails from './placeDetails'; const BottomView = ({ style, reduxState: { expanded, hidden, content, directionContent, language, mainColor }, callbackInterceptor, uses24, onExpandClick, onDirectionClick, onPhoneClick, onWebsiteClick, onShareClick, onInformationClick, onPlaceClick, onDirectionToPlaceClick }) => { return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, { style: [style, styles.bottomView, expanded && styles.expanded] }, directionContent && !hidden && /*#__PURE__*/React.createElement(BottomViewDirection, { errorLabel: directionContent === null || directionContent === void 0 ? void 0 : directionContent.errorLabel, durationLabel: directionContent === null || directionContent === void 0 ? void 0 : directionContent.durationLabel, distanceLabel: directionContent === null || directionContent === void 0 ? void 0 : directionContent.distanceLabel, mainColor: mainColor }), !directionContent && content && !hidden && /*#__PURE__*/React.createElement(PlaceDetails, { style: styles.placeDetails, reduxState: { placeDetails: content, expanded, language, mainColor }, callbackInterceptor: callbackInterceptor, uses24: uses24, onExpandClick: onExpandClick, onDirectionClick: onDirectionClick, onPhoneClick: onPhoneClick, onWebsiteClick: onWebsiteClick, onShareClick: onShareClick, onInformationClick: onInformationClick, onPlaceClick: onPlaceClick, onDirectionToPlaceClick: onDirectionToPlaceClick }))); }; const styles = StyleSheet.create({ bottomView: {}, floorItem: { margin: 2, // elevation: 4, borderRadius: 32, paddingVertical: 10, paddingHorizontal: 16, backgroundColor: 'white' }, floorItemSelected: { backgroundColor: '#f09' }, floorText: { flex: 1, padding: 0, margin: 0, fontSize: 16, color: 'black' }, floorTextSelected: { color: 'white' }, placeDetails: {}, expanded: { position: 'absolute', top: 0, bottom: 0, left: 0, right: 0 } }); export default BottomView; //# sourceMappingURL=index.js.map