2021-11-16 22:52:23 +01:00
|
|
|
import React from "react";
|
|
|
|
import Link from "next/link";
|
|
|
|
import { Text, Flex, Button } from "@chakra-ui/react";
|
|
|
|
import { motion } from "framer-motion";
|
2021-06-30 03:37:09 +02:00
|
|
|
|
2021-11-16 22:52:23 +01:00
|
|
|
const MotionFlex = motion(Flex);
|
2021-06-30 03:37:09 +02:00
|
|
|
|
|
|
|
const item = {
|
2021-11-16 22:52:23 +01:00
|
|
|
hidden: { y: 20, opacity: 0 },
|
|
|
|
visible: {
|
|
|
|
y: 0,
|
|
|
|
opacity: 1,
|
|
|
|
},
|
|
|
|
};
|
2021-06-24 10:48:39 +02:00
|
|
|
|
2021-11-16 22:52:23 +01:00
|
|
|
function Card({ title, desc, link }) {
|
|
|
|
return (
|
|
|
|
<Link href={link}>
|
|
|
|
<MotionFlex
|
|
|
|
direction="column"
|
|
|
|
background="gray.900"
|
|
|
|
width={300}
|
|
|
|
height={150}
|
|
|
|
p="5"
|
|
|
|
borderRadius="15px"
|
|
|
|
variants={item}
|
|
|
|
>
|
|
|
|
<Text fontSize="2xl">{title}</Text>
|
|
|
|
<Text fontSize="lg" style={{ marginBottom: "10px" }}>
|
|
|
|
{desc}
|
|
|
|
</Text>
|
|
|
|
<Button colorScheme="teal" variant="outline">
|
|
|
|
Learn More
|
|
|
|
</Button>
|
|
|
|
</MotionFlex>
|
|
|
|
</Link>
|
|
|
|
);
|
2021-06-24 10:48:39 +02:00
|
|
|
}
|
|
|
|
|
2021-11-16 22:52:23 +01:00
|
|
|
export default Card;
|