mirror of
https://github.com/supabase/supabase.git
synced 2026-06-13 01:39:53 +08:00
This PR migrates the whole monorepo to use Tailwind v4: - Removed `@tailwindcss/container-queries` plugin since it's included by default in v4, - Bump all instances of Tailwind to v4. Made minimal changes to the shared config to remove non-supported features (`alpha` mentions), - Migrate all apps to be compatible with v4 configs, - Fix the `typography.css` import in 3 apps, - Add missing rules which were included by default in v3, - Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot of classes - Rename all misnamed classes according to https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all apps. --------- Co-authored-by: Jordi Enric <jordi.err@gmail.com>
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import { Card, CardContent, cn } from 'ui'
|
|
import {
|
|
Table,
|
|
TableBody,
|
|
TableHead,
|
|
TableHeader,
|
|
TableHeadSort,
|
|
TableRow,
|
|
} from 'ui/src/components/shadcn/ui/table'
|
|
|
|
import { AccessTokenSort, AccessTokenSortColumn } from '../AccessToken.types'
|
|
|
|
const tableHeaderClass = 'text-left font-mono uppercase text-xs text-foreground-lighter py-2'
|
|
|
|
interface TableContainerProps {
|
|
children: React.ReactNode
|
|
sort: AccessTokenSort
|
|
onSortChange: (column: AccessTokenSortColumn) => void
|
|
}
|
|
|
|
export const TableContainer = ({ children, sort, onSortChange }: TableContainerProps) => (
|
|
<Card className="w-full overflow-hidden">
|
|
<CardContent className="p-0">
|
|
<Table className="p-5 table-auto">
|
|
<TableHeader>
|
|
<TableRow className="bg-200">
|
|
<TableHead className={tableHeaderClass}>Token</TableHead>
|
|
<TableHead className={tableHeaderClass}>
|
|
<TableHeadSort column="last_used_at" currentSort={sort} onSortChange={onSortChange}>
|
|
Last used
|
|
</TableHeadSort>
|
|
</TableHead>
|
|
<TableHead className={tableHeaderClass}>
|
|
<TableHeadSort column="expires_at" currentSort={sort} onSortChange={onSortChange}>
|
|
Expires
|
|
</TableHeadSort>
|
|
</TableHead>
|
|
<TableHead className={cn(tableHeaderClass, 'text-right!')} />
|
|
</TableRow>
|
|
</TableHeader>
|
|
<TableBody>{children}</TableBody>
|
|
</Table>
|
|
</CardContent>
|
|
</Card>
|
|
)
|