From 458feeec9e19d09e3950302b4613afeeb41dc2e3 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 12 Jun 2021 14:30:54 +1000 Subject: [PATCH] Move map and token settings to match the group overlay visual --- src/components/Select.js | 2 +- src/components/map/MapSettings.js | 306 +++++++++++++----------------- src/modals/EditMapModal.js | 53 ++++-- src/modals/EditTokenModal.js | 50 +++-- 4 files changed, 201 insertions(+), 210 deletions(-) diff --git a/src/components/Select.js b/src/components/Select.js index e56c418..5bc43fc 100644 --- a/src/components/Select.js +++ b/src/components/Select.js @@ -24,7 +24,7 @@ function Select({ creatable, ...props }) { }), control: (provided, state) => ({ ...provided, - backgroundColor: theme.colors.background, + backgroundColor: "transparent", color: theme.colors.text, borderColor: theme.colors.text, opacity: state.isDisabled ? 0.5 : 1, diff --git a/src/components/map/MapSettings.js b/src/components/map/MapSettings.js index fdfe0c4..8f05c3b 100644 --- a/src/components/map/MapSettings.js +++ b/src/components/map/MapSettings.js @@ -1,7 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Flex, Box, Label, Input, Checkbox, IconButton } from "theme-ui"; - -import ExpandMoreIcon from "../../icons/ExpandMoreIcon"; +import { Flex, Box, Label, Input, Checkbox } from "theme-ui"; import { isEmpty } from "../../helpers/shared"; import { getGridUpdatedInset } from "../../helpers/grid"; @@ -43,8 +41,6 @@ function MapSettings({ mapState, onSettingsChange, onStateSettingsChange, - showMore, - onShowMoreChange, }) { function handleFlagChange(event, flag) { if (event.target.checked) { @@ -177,172 +173,142 @@ function MapSettings({ my={1} /> - {showMore && ( - <> - - - - - s.value === map.grid.measurement.type - ) - } - onChange={handleGridMeasurementTypeChange} - isSearchable={false} - /> - - - - - - - - {!mapEmpty && map.type !== "default" && ( - - - - s.value === map.grid.type) + } + onChange={handleGridTypeChange} + isSearchable={false} + /> + + + + + + + + + + + + + + {!mapEmpty && map.type !== "default" && ( + + + +