diff options
| author | rlaks5757 <rlaks5757@gmail.com> | 2025-03-27 17:48:36 +0900 |
|---|---|---|
| committer | rlaks5757 <rlaks5757@gmail.com> | 2025-03-27 17:48:36 +0900 |
| commit | 773918229ccb14c0d00798fbbf2b2be0130a8251 (patch) | |
| tree | ab9e200e65cc471ec139cd8482bde70a3b0a105f /lib/rfqs/tbe-table/tbe-table-columns.tsx | |
| parent | 92ddb4f13d48cbf344dc2bf63df4457b3c713608 (diff) | |
| parent | 34bbeb86c1a8d24b5f526710889b5e54d699cfd0 (diff) | |
merge complete
Diffstat (limited to 'lib/rfqs/tbe-table/tbe-table-columns.tsx')
| -rw-r--r-- | lib/rfqs/tbe-table/tbe-table-columns.tsx | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/lib/rfqs/tbe-table/tbe-table-columns.tsx b/lib/rfqs/tbe-table/tbe-table-columns.tsx index 29fbd5cd..0e9b7064 100644 --- a/lib/rfqs/tbe-table/tbe-table-columns.tsx +++ b/lib/rfqs/tbe-table/tbe-table-columns.tsx @@ -178,37 +178,30 @@ const commentsColumn: ColumnDef<VendorWithTbeFields> = { openCommentSheet(vendor.tbeId ?? 0) } - return ( - <div className="flex items-center justify-center"> + return ( <Button variant="ghost" size="sm" - className="h-8 w-8 p-0 group relative" + className="relative h-8 w-8 p-0 group" onClick={handleClick} - aria-label={commCount > 0 ? `View ${commCount} comments` : "Add comment"} + aria-label={ + commCount > 0 ? `View ${commCount} comments` : "No comments" + } > - <div className="flex items-center justify-center relative"> - {commCount > 0 ? ( - <> - <MessageSquare className="h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors" /> - <Badge - variant="secondary" - className="absolute -top-2 -right-2 h-4 min-w-4 text-xs px-1 flex items-center justify-center" - > - {commCount} - </Badge> - </> - ) : ( - <MessageSquare className="h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors" /> - )} - </div> - <span className="sr-only">{commCount > 0 ? `${commCount} Comments` : "Add Comment"}</span> + <MessageSquare className="h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors" /> + {commCount > 0 && ( + <Badge + variant="secondary" + className="pointer-events-none absolute -top-1 -right-1 h-4 min-w-[1rem] p-0 text-[0.625rem] leading-none flex items-center justify-center" + > + {commCount} + </Badge> + )} + <span className="sr-only"> + {commCount > 0 ? `${commCount} Comments` : "No Comments"} + </span> </Button> - {/* <span className="ml-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer" onClick={handleClick}> - {commCount > 0 ? `${commCount} Comments` : "Add Comment"} - </span> */} - </div> - ) + ) }, enableSorting: false, maxSize:80 |
