-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
1 parent
ebe43ff
commit c1c3d48
Showing
5 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
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,17 @@ | ||
import React, { PropsWithChildren } from 'react'; | ||
|
||
export type AvatarGroupdCounterProps = PropsWithChildren<{ | ||
total?: number; | ||
href: string; | ||
}>; | ||
|
||
export const AvatarGroupCounter: React.FC<AvatarGroupdCounterProps> = ({ total, href }) => { | ||
return ( | ||
<a | ||
className="relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-700 text-xs font-medium text-white ring-2 ring-gray-300 hover:bg-gray-600 dark:border-gray-800 " | ||
href={href} | ||
> | ||
+{total} | ||
</a> | ||
); | ||
}; |
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,14 @@ | ||
import React, { PropsWithChildren, ReactNode } from 'react'; | ||
import { AvatarGroupCounter } from './AvatarGroupCounter'; | ||
|
||
export type AvatarGroupProps = PropsWithChildren<{ | ||
children: ReactNode; | ||
}>; | ||
|
||
const AvatarGroupComponent: React.FC<AvatarGroupProps> = ({ children }) => { | ||
return <div className="mb-5 flex -space-x-4">{children}</div>; | ||
}; | ||
|
||
export const AvatarGroup = Object.assign(AvatarGroupComponent, { | ||
Counter: AvatarGroupCounter, | ||
}); |
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