Added name display to tile
This commit is contained in:
parent
4c667e9c5f
commit
30e4a4c73f
@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { Flex, Image as UIImage, IconButton, Box } from "theme-ui";
|
import { Flex, Image as UIImage, IconButton, Box, Text } from "theme-ui";
|
||||||
|
|
||||||
import db from "../../database";
|
import db from "../../database";
|
||||||
|
|
||||||
@ -126,6 +126,24 @@ function MapTile({
|
|||||||
sx={{ width: "100%", height: "100%", objectFit: "contain" }}
|
sx={{ width: "100%", height: "100%", objectFit: "contain" }}
|
||||||
src={mapSource}
|
src={mapSource}
|
||||||
/>
|
/>
|
||||||
|
<Flex
|
||||||
|
sx={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
background:
|
||||||
|
"linear-gradient(to bottom, rgba(0,0,0,0) 70%,rgba(0,0,0,0.65) 100%);",
|
||||||
|
alignItems: "flex-end",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
p={2}
|
||||||
|
>
|
||||||
|
<Text as="p" variant="heading">
|
||||||
|
{map.name}
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
{/* Show expand button only if both reset and remove is available */}
|
{/* Show expand button only if both reset and remove is available */}
|
||||||
{isSelected && (
|
{isSelected && (
|
||||||
<Box sx={{ position: "absolute", top: 0, right: 0 }}>
|
<Box sx={{ position: "absolute", top: 0, right: 0 }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user