Skip to content

Commit 82d2a09

Browse files
committed
update project card to card element
1 parent 70dee95 commit 82d2a09

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/components/project-card.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Image, Link } from '@/components/mdx'
2-
import { Box, LinkBox, LinkOverlay, Stack, Text } from '@chakra-ui/react'
2+
import { Box, Card, CardBody, Stack, Text } from '@chakra-ui/react'
33

44
export const ProjectCard = ({ name, description, repo, homepage, logo }) => {
55
return (
6-
<LinkBox
6+
<Card
7+
as={Link}
8+
href={repo || homepage}
79
p={4}
810
rounded='lg'
911
transitionProperty='all'
@@ -14,16 +16,15 @@ export const ProjectCard = ({ name, description, repo, homepage, logo }) => {
1416
_hover={{
1517
transform: 'scale(1.025)',
1618
boxShadow: 'md',
19+
textDecoration: 'none',
1720
}}
1821
>
19-
<Stack spacing={2} direction={'column'} justify={'space-between'} gap={0}>
20-
<LinkOverlay
21-
href={repo || homepage}
22-
as={Link}
23-
_hover={{
24-
textDecoration: 'none',
25-
}}
26-
justify={'left'}
22+
<CardBody p={0}>
23+
<Stack
24+
spacing={2}
25+
direction={'column'}
26+
justify={'space-between'}
27+
gap={0}
2728
>
2829
<Box>
2930
<Image
@@ -39,8 +40,8 @@ export const ProjectCard = ({ name, description, repo, homepage, logo }) => {
3940
{description}
4041
</Text>
4142
</Box>
42-
</LinkOverlay>
43-
</Stack>
44-
</LinkBox>
43+
</Stack>
44+
</CardBody>
45+
</Card>
4546
)
4647
}

0 commit comments

Comments
 (0)