Fix select tile flow for odd number of elements

This commit is contained in:
Mitchell McCaffrey
2020-09-08 14:26:38 +10:00
parent d0002431c5
commit 36351efb82
6 changed files with 15 additions and 13 deletions
+3 -3
View File
@@ -32,7 +32,6 @@ function MapTiles({
sx={{
flexWrap: "wrap",
borderRadius: "4px",
justifyContent: "space-between",
}}
onClick={() => onMapSelect(null)}
>
@@ -48,14 +47,15 @@ function MapTiles({
":active": {
color: "secondary",
},
width: isSmallScreen ? "49%" : "32%",
width: isSmallScreen ? "48%" : "32%",
height: "0",
paddingTop: isSmallScreen ? "49%" : "32%",
paddingTop: isSmallScreen ? "48%" : "32%",
borderRadius: "4px",
position: "relative",
cursor: "pointer",
}}
my={1}
mx={`${isSmallScreen ? 1 : 2 / 3}%`}
bg="muted"
aria-label="Add Map"
title="Add Map"