mapwize-ui-react-native
Version:
Fully featured and ready to use UI to add Mapwize Indoor Maps and Navigation in your React Native app.
103 lines (94 loc) • 2.81 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 _reactNativeSafeAreaContext = require("react-native-safe-area-context");
var _icons = _interopRequireDefault(require("../../icons"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const BottomViewDirection = ({
durationLabel,
distanceLabel,
errorLabel,
mainColor = '#F23196'
}) => {
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
style: styles.bottomViewDirection,
edges: ['bottom']
}, errorLabel && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
style: styles.errorLabel
}, errorLabel), !errorLabel && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
style: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
}
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
source: _icons.default.CLOCK,
style: {
tintColor: mainColor,
marginRight: 8
}
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
style: (styles.duration, {
color: mainColor
})
}, durationLabel)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
style: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
}
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
source: _icons.default.WALK,
style: {
tintColor: mainColor,
marginRight: 8
}
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
style: (styles.distanceLabel, {
color: mainColor
})
}, distanceLabel)))));
};
const styles = _reactNative.StyleSheet.create({
bottomViewDirection: {
padding: 16,
flexDirection: 'row',
backgroundColor: 'white',
justifyContent: 'space-evenly',
elevation: 8,
zIndex: 8,
shadowOffset: {
width: 0,
height: -1
},
shadowOpacity: 0.2,
shadowRadius: 2,
borderTopEndRadius: 8,
borderTopStartRadius: 8
},
duration: {
margin: 2,
borderRadius: 32,
padding: 16,
backgroundColor: 'white'
},
distanceLabel: {
margin: 2,
borderRadius: 32,
padding: 16,
backgroundColor: 'white'
},
errorLabel: {
margin: 2,
borderRadius: 32,
padding: 16,
backgroundColor: 'white'
}
});
var _default = BottomViewDirection;
exports.default = _default;
//# sourceMappingURL=bottomViewDirection.js.map