UNPKG

@chayns-components/maps

Version:

A set of beautiful React components for developing your own applications with chayns.

31 lines 1.16 kB
import { Input } from '@chayns-components/core'; import React from 'react'; import { DEFAULT_POLYGON_OPTIONS, DEFAULT_POSITION } from '../../constants/positionInput'; import MapWrapper from './map-wrapper/MapWrapper'; import { StyledPositionInput, StyledPositionInputSearch } from './PositionInput.styles'; const PositionInput = ({ searchPlaceholder, apiToken, polygonOptions = DEFAULT_POLYGON_OPTIONS, initialPosition = DEFAULT_POSITION, zoom = 13, markers, onMarkerRemove, onMarkerChange, onMarkerAdd }) => /*#__PURE__*/React.createElement(StyledPositionInput, null, /*#__PURE__*/React.createElement(StyledPositionInputSearch, null, /*#__PURE__*/React.createElement(Input, { id: "auto-complete-input", placeholder: searchPlaceholder })), /*#__PURE__*/React.createElement(MapWrapper, { apiToken: apiToken, polygonOptions: polygonOptions, initialPosition: initialPosition, initialZoom: zoom, markers: markers, onMarkerAdd: onMarkerAdd, onMarkerChange: onMarkerChange, onMarkerRemove: onMarkerRemove })); PositionInput.displayName = 'PositionInput'; export default PositionInput; //# sourceMappingURL=PositionInput.js.map