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
3 changes: 3 additions & 0 deletions playbook/app/pb_kits/playbook/pb_map/_map.scss
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
@import "../tokens/shadows";
@import "../tokens/border_radius";
@import "./_pb_map_button_mixin.scss";
@import "../tokens/titles";

[class*="pb_map"] {
.pb_map-custom-button {
@@ -159,6 +160,7 @@
}

.maplibregl-popup-content {
@include pb_title_4;
padding: $space_sm;
background-color: $card_light;
box-shadow: $shadow_deeper;
@@ -194,6 +196,7 @@
}

.maplibregl-popup-content {
@include pb_title_4;
background-color: $bg_dark;
color: $text_dk_default;
}
8 changes: 4 additions & 4 deletions playbook/app/pb_kits/playbook/pb_map/docs/_map_default.jsx
Original file line number Diff line number Diff line change
@@ -25,12 +25,12 @@ const MapDefault = (props) => {
new maplibregl.Marker({
color: mapTheme.marker,
}).setLngLat(defaultPosition)
.setPopup(new maplibregl.Popup({closeButton: false}).setHTML(`<h4 class="pb_title_kit_size_4">Hello World!</h4>`)) // add popup
.setPopup(new maplibregl.Popup({closeButton: false}).setHTML('Hello World!')) // add popup
.addTo(map);

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

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

}, [])

return (
return (
<Map flyTo
flyToClick={()=> {handleFlyTo(mapInstance)}}
zoomBtns
@@ -63,7 +63,7 @@ return (
position: 'absolute',
left: 0,
right: 0,
top: 0,
top: 0,
bottom: 0,
}}
/>
Original file line number Diff line number Diff line change
@@ -25,12 +25,12 @@ const MapWithCustomButton = (props) => {
new maplibregl.Marker({
color: mapTheme.marker,
}).setLngLat(defaultPosition)
.setPopup(new maplibregl.Popup({closeButton: false}).setHTML(`<h4 class="pb_title_kit_size_4">Hello World!</h4>`)) // add popup
.setPopup(new maplibregl.Popup({closeButton: false}).setHTML('Hello World!')) // add popup
.addTo(map);

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

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

}, [])

return (
<Map
return (
<Map
{...props}
>
<Map.Controls flyTo
@@ -59,10 +59,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>
@@ -72,7 +72,7 @@ return (
position: 'absolute',
left: 0,
right: 0,
top: 0,
top: 0,
bottom: 0,
}}
/>
10 changes: 5 additions & 5 deletions playbook/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ const MapWithPlugin = (props) => {
new maplibregl.Marker({
color: mapTheme.marker,
}).setLngLat(defaultPosition)
.setPopup(new maplibregl.Popup({className: 'map_popup', closeButton: false}).setHTML(`<h4 class="pb_title_kit_size_4">Hello World!</h4>`)) // add popup
.setPopup(new maplibregl.Popup({className: 'map_popup', closeButton: false}).setHTML('Hello World!')) // add popup
.addTo(map);

//add maplibre default zoom controls
@@ -48,7 +48,7 @@ const MapWithPlugin = (props) => {
map.addControl(new maplibregl.AttributionControl({
compact: true
}));

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


return (

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