We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7dff53 commit b990594Copy full SHA for b990594
src/map/map.tsx
@@ -15,12 +15,14 @@ type MapRef = ol.Map | undefined;
15
export interface MapProps {
16
mapRef?: MutableRefObject<ol.Map>;
17
onMouseMove?: (event: any) => void;
18
+ customCss?: React.CSSProperties;
19
}
20
21
export const Map: FunctionComponent<MapProps> = ({
22
children,
23
onMouseMove,
24
mapRef,
25
+ customCss,
26
}) => {
27
const mapEl = useRef<HTMLDivElement>(null);
28
@@ -48,7 +50,7 @@ export const Map: FunctionComponent<MapProps> = ({
48
50
49
51
return (
52
<MapContext.Provider value={map}>
- <div ref={mapEl} className="ol-map">
53
+ <div ref={mapEl} className="ol-map" style={customCss}>
54
{children}
55
</div>
56
</MapContext.Provider>
0 commit comments