-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added component VerificationBadge and used it on GroupCard.
Signed-off-by: Jan Hendrik Scheufen <j.h.scheufen@gmail.com>
- Loading branch information
1 parent
fb3b70a
commit 4b760f6
Showing
5 changed files
with
35 additions
and
5 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
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,27 @@ | ||
import { Badge, BadgeProps } from '@nextui-org/badge'; | ||
import { Tooltip } from '@nextui-org/tooltip'; | ||
import { CircleCheckIcon } from 'lucide-react'; | ||
|
||
type Props = { verified: boolean } & BadgeProps; | ||
|
||
const VerificationBadge = ({ verified, children, ...props }: Props) => { | ||
if (!verified) return children; | ||
return ( | ||
<Badge | ||
content={ | ||
<Tooltip content="Verified Group"> | ||
<CircleCheckIcon className="[&>circle]:fill-primary stroke-default-100" /> | ||
</Tooltip> | ||
} | ||
placement="top-left" | ||
isOneChar | ||
color="primary" | ||
tooltip="Verified Group" | ||
{...props} | ||
> | ||
{children} | ||
</Badge> | ||
); | ||
}; | ||
|
||
export default VerificationBadge; |
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