-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/components/cooperation/collaboratorAvatarList/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
|
||
import { cn } from '@/utils'; | ||
|
||
interface AvatarCirclesProps { | ||
className?: string; | ||
avatarCount?: number; | ||
avatarUrls: string[]; | ||
} | ||
|
||
export const CollaboratorAvatarList = ({ | ||
avatarCount, | ||
className, | ||
avatarUrls, | ||
}: AvatarCirclesProps) => { | ||
return ( | ||
<div className={cn('z-10 flex -space-x-3', className)}> | ||
{avatarUrls.map((url, index) => ( | ||
<img | ||
key={index} | ||
className="h-8 w-8 rounded-full border-2 border-white dark:border-gray-800" | ||
src={url} | ||
width={40} | ||
height={40} | ||
alt={`Avatar ${index + 1}`} | ||
/> | ||
))} | ||
{avatarCount && ( | ||
<span className="flex h-8 w-8 items-center justify-center rounded-full border-2 border-white bg-black text-center text-xs font-medium text-white hover:bg-gray-600 dark:border-gray-800 dark:bg-white dark:text-black"> | ||
+{avatarCount} | ||
</span> | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters