Skip to content

Commit 46f5c18

Browse files
committed
add tooltip
1 parent 26c3848 commit 46f5c18

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/modules/users/table-cells/UserStatusCell.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import FullTooltip from "@components/FullTooltip";
12
import { cn } from "@utils/helpers";
3+
import { HelpCircle } from "lucide-react";
24
import React from "react";
35
import { User } from "@/interfaces/User";
46

@@ -35,6 +37,26 @@ export default function UserStatusCell({ user }: Readonly<Props>) {
3537
>
3638
<span className={cn("h-2 w-2 rounded-full", color)}></span>
3739
{text}
40+
{isPendingApproval && (
41+
<FullTooltip
42+
content={
43+
<div className={"max-w-xs text-xs"}>
44+
<p>This user requires approval from an administrator.</p>
45+
<p className="mt-2">
46+
To disable user approval requirements for new users, go to the account{" "}
47+
<span className="text-nb-gray-200 inline-flex gap-1 items-center max-h-[22px] font-medium bg-nb-gray-900 py-[3px] text-[11px] px-[5px] border border-nb-gray-800 rounded-[4px]">
48+
Settings
49+
</span>{" "}
50+
and disable "User Approval Required".
51+
</p>
52+
</div>
53+
}
54+
interactive={true}
55+
side="right"
56+
>
57+
<HelpCircle size={14} className="text-orange-400 cursor-help" />
58+
</FullTooltip>
59+
)}
3860
</div>
3961
);
4062
}

0 commit comments

Comments
 (0)