Skip to content

Commit

Permalink
CDC #115 - Adding ability to pass children to MapDraw component
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Jan 23, 2024
1 parent ab85a27 commit 8a850e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/geospatial/src/components/MapDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ import React, {
useEffect,
useMemo,
useRef,
useState
useState,
type Node
} from 'react';
import Map, { MapRef } from 'react-map-gl';
import _ from 'underscore';
import DrawControl from './DrawControl';
import './MapDraw.css';

type Props = {
/**
* Additional child nodes to render.
*/
children?: Node,

/**
* GeoJSON structured data to be displayed on the map.
*/
Expand Down Expand Up @@ -123,6 +129,7 @@ const MapDraw = (props: Props) => {
onUpdate={onChange}
onDelete={onChange}
/>
{ ...props.children }
</Map>
);
};
Expand Down

0 comments on commit 8a850e2

Please sign in to comment.