2022-06-04 23:48:13 +01:00
|
|
|
import React from "react";
|
|
|
|
import { SVGCardProps } from "@/interfaces/components";
|
2022-07-24 23:40:18 +01:00
|
|
|
import {
|
|
|
|
Box,
|
|
|
|
Center,
|
|
|
|
Image,
|
|
|
|
Text,
|
|
|
|
useColorModeValue,
|
|
|
|
useDisclosure,
|
|
|
|
} from "@chakra-ui/react";
|
2022-06-24 13:31:15 +01:00
|
|
|
import Tap from "@/animations/tap";
|
|
|
|
import CustomLink from "@/common/link";
|
2022-06-04 23:48:13 +01:00
|
|
|
|
|
|
|
const SVGCard = (props: SVGCardProps) => {
|
|
|
|
const bg = useColorModeValue("bg.light", "bg.dark");
|
2022-07-24 00:55:46 -04:00
|
|
|
const color = useColorModeValue("rgb(0,0,0, .1)", "rgb(255,255,255, .1)");
|
2022-06-04 23:48:13 +01:00
|
|
|
return (
|
2022-07-24 23:40:18 +01:00
|
|
|
<>
|
|
|
|
<Tap>
|
|
|
|
<CustomLink href={`/svg/${props.id}`}>
|
|
|
|
<Box
|
|
|
|
bg={bg}
|
|
|
|
p={4}
|
|
|
|
cursor="pointer"
|
|
|
|
borderRadius="10px"
|
|
|
|
borderWidth="1px"
|
|
|
|
mb="2"
|
|
|
|
_hover={{
|
2022-07-26 15:05:26 -04:00
|
|
|
border:`1px solid ${color}`,
|
|
|
|
transform: "scale(0.98)",
|
2022-07-24 23:40:18 +01:00
|
|
|
}}
|
2022-07-26 15:05:26 -04:00
|
|
|
transition="all 0.2s" >
|
2022-07-24 23:40:18 +01:00
|
|
|
<Center>
|
|
|
|
<Image boxSize="50px" src={props.svg} alt={props.title} />
|
|
|
|
</Center>
|
|
|
|
<Text mt="2" fontWeight="light" textAlign="center">
|
|
|
|
{props.title}
|
|
|
|
</Text>
|
|
|
|
</Box>
|
|
|
|
</CustomLink>
|
|
|
|
</Tap>
|
|
|
|
</>
|
2022-06-04 23:48:13 +01:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SVGCard;
|