-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbioCard.tsx
More file actions
96 lines (95 loc) · 2.38 KB
/
Copy pathbioCard.tsx
File metadata and controls
96 lines (95 loc) · 2.38 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
'use client';
import Avatar from '@mui/joy/Avatar';
import Chip from '@mui/joy/Chip';
import Box from '@mui/joy/Box';
import Card from '@mui/joy/Card';
import CardContent from '@mui/joy/CardContent';
import IconButton from '@mui/joy/IconButton';
import Typography from '@mui/joy/Typography';
import LanguageIcon from '@mui/icons-material/Language';
import TwitterIcon from '@mui/icons-material/Twitter';
import GitHubIcon from '@mui/icons-material/GitHub';
import { MemberData } from '@/type/member';
export default function BioCard({
text,
name,
avatar,
homepage,
twitter,
github,
role,
}: MemberData) {
return (
<Card sx={{ width: 320, maxWidth: '100%', boxShadow: 'lg' }}>
<CardContent sx={{ alignItems: 'center', textAlign: 'center' }}>
<Avatar
src={avatar}
sx={{ '--Avatar-size': '4rem' }}
/>
<Chip
size="sm"
variant="soft"
color="primary"
sx={{
mt: -1,
mb: 1,
border: '3px solid',
borderColor: 'background.surface',
}}
>
{role}
</Chip>
<Typography level="title-lg">{name}</Typography>
<Typography
level="body-sm"
sx={{ maxWidth: '24ch' }}
>
{text}
</Typography>
<Box
sx={{
display: 'flex',
gap: 2,
mt: 2,
'& > button': { borderRadius: '2rem' },
}}
height={32}
>
{github && (
<IconButton
size="sm"
variant="plain"
color="neutral"
component="a"
href={`https://github.com/${github}`}
>
<GitHubIcon />
</IconButton>
)}
{twitter && (
<IconButton
size="sm"
variant="plain"
color="neutral"
component="a"
href={`https://twitter.com/${twitter}`}
>
<TwitterIcon />
</IconButton>
)}
{homepage && (
<IconButton
size="sm"
variant="plain"
color="neutral"
component="a"
href={homepage}
>
<LanguageIcon />
</IconButton>
)}
</Box>
</CardContent>
</Card>
);
}