Skip to content

Commit

Permalink
Merge pull request #690 from theblvckdev/feat/HNG-20-admin-charts-com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
Prudent Bird authored Jul 27, 2024
2 parents c868e12 + 08b3ba9 commit 65a04ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 44 deletions.
44 changes: 8 additions & 36 deletions src/app/dashboard/(admin)/admin/users/component/userTableBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const UserTableBody = () => {
className={`whitespace-nowrap p-4 text-left text-base font-normal capitalize leading-4 text-neutral-dark-2`}
>
<div className="flex flex-row items-center gap-2">
<div className="h-10 w-10 overflow-hidden rounded-full">
<div className="h-10 w-10 overflow-hidden rounded-full bg-gray-200">
<Image
src={avatar}
className="object-cover"
Expand All @@ -40,77 +40,49 @@ const UserTableBody = () => {
/>
</div>
<div>
<h3 className="text-base font-[500] leading-6 text-neutral-dark-2">
<h3 className="text-sm font-[500] leading-6 text-neutral-dark-2">
{fullName}
</h3>
<div className="text-sm font-normal lowercase leading-4 text-neutral-dark-1">
<div className="text-xs font-normal lowercase leading-4 text-neutral-dark-1">
{email}
</div>
</div>
</div>
</td>

<td
className={`gap-2 whitespace-nowrap p-4 text-left text-base font-normal capitalize leading-4 text-neutral-dark-2`}
className={`gap-2 whitespace-nowrap p-4 text-left text-sm font-normal capitalize leading-4 text-neutral-dark-2`}
>
{phone}
</td>

<td
className={`whitespace-nowrap p-4 text-left text-base font-normal capitalize leading-4 text-neutral-dark-2`}
className={`whitespace-nowrap p-4 text-left text-sm font-normal capitalize leading-4 text-neutral-dark-2`}
>
{date}
</td>

<td
className={`whitespace-nowrap p-4 text-left text-base font-normal capitalize leading-4 text-neutral-dark-2`}
className={`whitespace-nowrap p-4 text-left text-sm font-normal capitalize leading-4 text-neutral-dark-2`}
>
<div className="flex items-center gap-1">
{status.active && (
<>
<div className="h-3 w-3 rounded-full bg-success"></div>
<div>Active</div>
<div className="text-sm">Active</div>
</>
)}

{!status.active && (
<>
<div className="h-3 w-3 rounded-full bg-error"></div>
<div>Inactive</div>
<div className="text-sm">Inactive</div>
</>
)}
</div>
</td>

<td className="whitespace-nowrap p-4 text-center text-base font-normal capitalize leading-4 text-neutral-dark-2">
{/* <div className="relative" ref={menuReference}>
<button
onClick={() => {
setShowDropdown(userData[index]);
setOpen(!open);
}}
className="outline-none"
>
<EllipsisVertical size={16} color="#09090b" />
</button>
<DropdownMenu
position="md:right-0 right-ful"
width="w-[100px]"
active={showDropdown?.fullName === fullName && open}
>
<Link href={"#"} className="outline-none">
<button className="block w-full px-2 py-1.5 text-left text-sm font-normal leading-5 text-neutral-dark-2">
Edit
</button>
</Link>
<button className="block w-full px-2 py-1.5 text-left text-sm font-normal leading-5 text-neutral-dark-2">
Delete
</button>
</DropdownMenu>
</div> */}

<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const UserTableHead = () => {
return (
<th
key={index}
className={`whitespace-nowrap p-4 text-left text-base font-normal capitalize leading-4 text-neutral-dark-2 ${data === "name" ? "w-[300px]" : data === "action" ? "w-[86px]" : "w-[202px]"}`}
className={`whitespace-nowrap p-4 text-left text-sm font-normal capitalize leading-4 text-neutral-dark-2 ${data === "name" ? "w-[300px]" : data === "action" ? "w-[86px]" : "w-[202px]"}`}
>
{data}
</th>
Expand Down
8 changes: 1 addition & 7 deletions src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ const DialogHeader = ({
className,
...properties
}: React.HTMLProps<HTMLDivElement>) => (
<div
className={cn(
"flex flex-col space-y-1.5 text-center sm:text-left",
className,
)}
{...properties}
/>
<div className={cn("flex flex-col space-y-1.5", className)} {...properties} />
);
DialogHeader.displayName = "DialogHeader";

Expand Down

0 comments on commit 65a04ce

Please sign in to comment.