-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathproject-card.js
More file actions
56 lines (54 loc) · 1.21 KB
/
project-card.js
File metadata and controls
56 lines (54 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Link } from '@/components/mdx'
import { Box, Card, CardBody, Stack, Text } from '@chakra-ui/react'
import { ColorModeImage } from '@/components/ColorModeImage'
export const ProjectCard = ({
name,
description,
repo,
homepage,
logo_light,
logo_dark,
}) => {
return (
<Card
as={Link}
href={repo || homepage}
p={4}
rounded='lg'
transitionProperty='all'
transitionDuration='slower'
transitionTimingFunction='ease-out'
bg='gray.50'
_dark={{ bg: 'gray.700' }}
_hover={{
transform: 'scale(1.025)',
boxShadow: 'md',
textDecoration: 'none',
}}
>
<CardBody p={0}>
<Stack
spacing={2}
direction={'column'}
justify={'space-between'}
gap={0}
>
<Box>
<ColorModeImage
h={'128'}
w={'full'}
lightSrc={logo_light}
darkSrc={logo_dark}
alt={name}
layout='fill'
objectFit='contain'
/>
<Text my={4} noOfLines={4}>
{description}
</Text>
</Box>
</Stack>
</CardBody>
</Card>
)
}