Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAY-1724] DARK MODE AUDIT - Map #4126

Closed
wants to merge 12 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@
.pb_map {
height: 600px;
position: relative;
[class^="pb_title_kit"][class*="_4"] {
color: $text_lt_default
}

.dark & {
[class^="pb_title_kit"][class*="_4"] {
color: $text_dk_default;
}
}
}
5 changes: 2 additions & 3 deletions playbook/app/pb_kits/playbook/pb_map/docs/_map_default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const MapDefault = (props) => {

// disable map zoom when using scroll
map.scrollZoom.disable();

//add attributioncontrols
map.addControl(new maplibregl.AttributionControl({
compact: true
Expand All @@ -49,7 +48,7 @@ const MapDefault = (props) => {

}, [])

return (
return (
<Map flyTo
flyToClick={()=> {handleFlyTo(mapInstance)}}
zoomBtns
Expand All @@ -63,7 +62,7 @@ return (
position: 'absolute',
left: 0,
right: 0,
top: 0,
top: 0,
bottom: 0,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const MapWithCustomButton = (props) => {

// disable map zoom when using scroll
map.scrollZoom.disable();

//add attributioncontrols
map.addControl(new maplibregl.AttributionControl({
compact: true
Expand All @@ -49,8 +48,8 @@ const MapWithCustomButton = (props) => {

}, [])

return (
<Map
return (
<Map
{...props}
>
<Map.Controls flyTo
Expand All @@ -59,10 +58,10 @@ return (
zoomInClick={() => {handleZoomIn(mapInstance)}}
zoomOutClick={()=> {handleZoomOut(mapInstance)}}
>
<MapCustomButton icon="home"
<MapCustomButton icon="home"
onClick={() => alert("button clicked!")}
/>
<MapCustomButton icon="search"
<MapCustomButton icon="search"
onClick={() => alert("button clicked!")}
/>
</Map.Controls>
Expand All @@ -72,7 +71,7 @@ return (
position: 'absolute',
left: 0,
right: 0,
top: 0,
top: 0,
bottom: 0,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const MapWithPlugin = (props) => {

// disable map zoom when using scroll
map.scrollZoom.disable();

//Add polygon draw button using map-box-gl-draw plugin
var draw = new MapboxDraw({
displayControlsDefault: false,
Expand All @@ -48,7 +47,7 @@ const MapWithPlugin = (props) => {
map.addControl(new maplibregl.AttributionControl({
compact: true
}));

//set map instance
setMapInstance(map)
}
Expand All @@ -62,8 +61,7 @@ const MapWithPlugin = (props) => {
}, [])



return (
return (
<Map flyTo
flyToClick={()=> {handleFlyTo(mapInstance)}}
zoomBtns
Expand All @@ -77,7 +75,7 @@ return (
position: 'absolute',
left: 0,
right: 0,
top: 0,
top: 0,
bottom: 0,
}}
/>
Expand Down
Loading