diff --git a/src/components/MapControls.js b/src/components/MapControls.js index c980384..3e8716a 100644 --- a/src/components/MapControls.js +++ b/src/components/MapControls.js @@ -138,7 +138,7 @@ function MapControls({ setCurrentSubmenu(tool); setCurrentSubmenuOptions({ // Align the right of the submenu to the left of the tool and center vertically - left: `${toolRect.left - 4}px`, + left: `${toolRect.left - 16}px`, top: `${toolRect.bottom - toolRect.height / 2}px`, style: { transform: "translate(-100%, -50%)" }, }); @@ -162,7 +162,6 @@ function MapControls({ return ( <> @@ -187,7 +189,10 @@ function MapControls({ flexDirection: "column", alignItems: "center", display: isExpanded ? "flex" : "none", + backgroundColor: "overlay", + borderRadius: "4px", }} + p={2} > {divider} diff --git a/src/components/MapMenu.js b/src/components/MapMenu.js index 5f63b49..3be5c31 100644 --- a/src/components/MapMenu.js +++ b/src/components/MapMenu.js @@ -1,6 +1,8 @@ import React from "react"; import Modal from "react-modal"; +import { useThemeUI } from "theme-ui"; + function MapMenu({ isOpen, onRequestClose, @@ -35,6 +37,9 @@ function MapMenu({ } onModalContent(node); } + + const { theme } = useThemeUI(); + return (