@mint-ui/map
Version:
- React map library - Control various map with one interface - Google, Naver, Kakao map supported now - Typescript supported - Canvas marker supported
54 lines (46 loc) • 1.88 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var classNames = require('classnames/bind');
var MintMapWrapper_module = require('./MintMapWrapper.module.scss.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
var cn = classNames__default["default"].bind(MintMapWrapper_module);
/**
* Mint Map 컴포넌트
*
* @param {MapControlWrapperProps} MapControlWrapperProps
*
* @returns {JSX.Element} JSX
*/
function MapControlWrapper(_a) {
var _b = _a.width,
width = _b === void 0 ? 'fit-content' : _b,
_c = _a.height,
height = _c === void 0 ? 'fit-content' : _c,
_d = _a.positionHorizontal,
positionHorizontal = _d === void 0 ? 'left' : _d,
_e = _a.positionVertical,
positionVertical = _e === void 0 ? 'top' : _e,
disablePointerEvent = _a.disablePointerEvent,
_f = _a.zIndex,
zIndex = _f === void 0 ? 101 : _f,
children = _a.children;
return React__default["default"].createElement("div", {
className: cn('mint-map-control-wrapper-container'),
style: {
justifyContent: positionHorizontal === 'center' ? 'center' : positionHorizontal === 'right' ? 'flex-end' : 'flex-start',
alignItems: positionVertical === 'center' ? 'center' : positionVertical === 'bottom' ? 'flex-end' : 'flex-start',
zIndex: zIndex
}
}, React__default["default"].createElement("div", {
className: cn('mint-map-control-wrapper'),
style: {
width: width,
height: height,
pointerEvents: disablePointerEvent === true ? 'none' : 'auto'
}
}, children));
}
exports.MapControlWrapper = MapControlWrapper;