mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03: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>
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import type { Column } from 'react-data-grid'
|
|
import { cn } from 'ui'
|
|
|
|
import { SecretRow } from './SecretRow'
|
|
import { SecretTableColumn } from './Secrets.types'
|
|
import type { VaultSecret } from '@/types'
|
|
|
|
export const SECRET_TABLE_COLUMNS: SecretTableColumn[] = [
|
|
{ id: 'secret', name: 'Secret', minWidth: 300, width: 360 },
|
|
{ id: 'id', name: 'ID', minWidth: 220, width: 260 },
|
|
{ id: 'secret_value', name: 'Value', minWidth: 320, width: 420 },
|
|
{ id: 'updated_at', name: 'Last updated', minWidth: 180 },
|
|
{ id: 'actions', name: '', minWidth: 75, width: 75 },
|
|
]
|
|
|
|
export const formatSecretColumns = (): Column<VaultSecret>[] => {
|
|
return SECRET_TABLE_COLUMNS.map((col) => {
|
|
const result: Column<VaultSecret> = {
|
|
key: col.id,
|
|
name: col.name,
|
|
minWidth: col.minWidth ?? 100,
|
|
maxWidth: col.maxWidth,
|
|
width: col.width,
|
|
resizable: false,
|
|
sortable: false,
|
|
draggable: false,
|
|
headerCellClass: undefined,
|
|
renderHeaderCell: () => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'flex items-center justify-between font-normal text-xs w-full',
|
|
col.id === 'secret' && 'ml-8'
|
|
)}
|
|
>
|
|
<p className="text-foreground!">{col.name}</p>
|
|
</div>
|
|
)
|
|
},
|
|
renderCell: ({ row }) => <SecretRow row={row} col={col} />,
|
|
}
|
|
return result
|
|
})
|
|
}
|