@ssplib/react-components 0.0.268 → 0.0.269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { BoxProps } from '@mui/material';
2
+ import React from 'react';
2
3
  import 'leaflet-defaulticon-compatibility';
3
4
  import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css';
4
5
  import 'leaflet/dist/leaflet.css';
@@ -10,5 +11,6 @@ export interface MapProps {
10
11
  pulseMarkerList?: LatLngExpression[];
11
12
  popupContent?: ReactElement;
12
13
  style?: BoxProps;
14
+ mapStyle?: React.CSSProperties;
13
15
  }
14
16
  export declare function Map(props: MapProps): JSX.Element;
@@ -15,7 +15,7 @@ require("leaflet/dist/leaflet.css");
15
15
  const AnimatedMarker_1 = __importDefault(require("./AnimatedMarker"));
16
16
  function Map(props) {
17
17
  return (react_1.default.createElement(material_1.Box, Object.assign({ borderRadius: 2, border: '2px solid #c7c7c7', overflow: 'hidden' }, props.style),
18
- react_1.default.createElement(react_leaflet_1.MapContainer, { center: props.firstCoords, zoom: 19, scrollWheelZoom: true, style: { height: '75vh', width: '100%' } },
18
+ react_1.default.createElement(react_leaflet_1.MapContainer, { center: props.firstCoords, zoom: 19, scrollWheelZoom: true, style: props.mapStyle },
19
19
  react_1.default.createElement(react_leaflet_1.TileLayer, { attribution: '\u00A9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' }),
20
20
  props.pulseMarkerList && props.pulseMarkerList.map((coord, idx) => react_1.default.createElement(AnimatedMarker_1.default, { key: JSON.stringify(coord) + idx, coords: coord })),
21
21
  react_1.default.createElement(DraggableMarker_1.default, { startCoord: props.firstCoords, onChange: props.onCoordsChange, showPopup: typeof props.popupContent !== 'undefined' }, props.popupContent))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.268",
3
+ "version": "0.0.269",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",