File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
app/(admin)/(user-management)/scopesets/_components Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 88 DropdownMenuTrigger ,
99} from "@/components/ui/dropdown-menu" ;
1010import { StyledLink } from "@/components/ui/link" ;
11+ import { Tooltip , TooltipContent , TooltipTrigger } from "@/components/ui/tooltip" ;
1112import type { ColumnDef } from "@tanstack/react-table" ;
1213import { MoreHorizontal } from "lucide-react" ;
1314import Link from "next/link" ;
@@ -49,7 +50,27 @@ export const columns: ColumnDef<ScopeSet>[] = [
4950 cell : ( { row } ) => {
5051 const scopes = row . original . scopes ;
5152
52- return < code > { scopes . join ( ", " ) } </ code > ;
53+ return (
54+ < div
55+ className = { `
56+ max-w-24 truncate overflow-hidden
57+ sm:max-w-36
58+ md:max-w-48
59+ lg:max-w-84
60+ xl:max-w-96
61+ ` }
62+ >
63+ < Tooltip >
64+ < TooltipTrigger >
65+ < code > { scopes . join ( ", " ) } </ code >
66+ </ TooltipTrigger >
67+
68+ < TooltipContent side = "left" >
69+ 總共 { scopes . length } 個權限
70+ </ TooltipContent >
71+ </ Tooltip >
72+ </ div >
73+ ) ;
5374 } ,
5475 } ,
5576 {
You can’t perform that action at this time.
0 commit comments