-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.tsx
More file actions
37 lines (31 loc) · 906 Bytes
/
index.tsx
File metadata and controls
37 lines (31 loc) · 906 Bytes
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
import { ArrowUpRightIcon } from '@heroicons/react/24/solid';
import type { ComponentProps, FC } from 'react';
import Avatar from '@/components/Common/AvatarGroup/Avatar';
import Link from '@/components/Link';
import styles from './index.module.css';
export type AvatarOverlayProps = ComponentProps<typeof Avatar> & {
url?: string;
};
const AvatarOverlay: FC<AvatarOverlayProps> = ({
image,
name,
nickname,
fallback,
url,
}) => (
<Link className={styles.overlay} href={url} target="_blank">
<Avatar
image={image}
name={name}
nickname={nickname}
fallback={fallback}
size="medium"
/>
<div className={styles.user}>
{name && <div className={styles.name}>{name}</div>}
{nickname && <div className={styles.nickname}>{nickname}</div>}
</div>
<ArrowUpRightIcon className={styles.arrow} />
</Link>
);
export default AvatarOverlay;