mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Context This is largely just a mechanical change here: Opting to use lucide icons with the `Icon` suffix across all icon imports within `studio` - so that it’s clearer which components are icons + reduces the possibility of name collision with our own components - e.g <User /> vs <UserIcon /> Also added a eslint rule for this: <img width="1069" height="167" alt="image" src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc" /> And updated `AGENTS.md` as such: ``` Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced). ```
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
import { TrashIcon } from 'lucide-react'
|
|
import { Button, TableCell, TableRow } from 'ui'
|
|
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
|
|
|
|
import CopyButton from '@/components/ui/CopyButton'
|
|
import type { AuthorizedApp } from '@/data/oauth/authorized-apps-query'
|
|
|
|
export interface AuthorizedAppRowProps {
|
|
app: AuthorizedApp
|
|
onSelectRevoke: () => void
|
|
}
|
|
|
|
export const AuthorizedAppRow = ({ app, onSelectRevoke }: AuthorizedAppRowProps) => {
|
|
return (
|
|
<TableRow>
|
|
<TableCell className="w-[62px] min-w-[62px] max-w-[62px]">
|
|
<div
|
|
className="w-[30px] h-[30px] rounded-full bg-no-repeat bg-cover bg-center border border-control flex items-center justify-center text-xs"
|
|
style={{ backgroundImage: app.icon ? `url('${app.icon}')` : 'none' }}
|
|
>
|
|
{!!app.icon ? '' : `${app.name[0]}`}
|
|
</div>
|
|
</TableCell>
|
|
<TableCell>
|
|
<p className="truncate" title={app.name}>
|
|
{app.name}
|
|
</p>
|
|
</TableCell>
|
|
<TableCell>{app.created_by}</TableCell>
|
|
<TableCell>
|
|
<div className="flex items-center gap-x-2">
|
|
<p className="text-xs font-mono truncate" title={app.app_id}>
|
|
{app.app_id}
|
|
</p>
|
|
<CopyButton iconOnly variant="default" text={app.app_id} className="px-1" />
|
|
</div>
|
|
</TableCell>
|
|
<TableCell>
|
|
<TimestampInfo
|
|
utcTimestamp={app.authorized_at ?? ''}
|
|
labelFormat="DD/MM/YYYY, HH:mm:ss"
|
|
className="text-sm"
|
|
/>
|
|
</TableCell>
|
|
<TableCell className="text-right">
|
|
<Button icon={<TrashIcon />} className="px-1" onClick={() => onSelectRevoke()} />
|
|
</TableCell>
|
|
</TableRow>
|
|
)
|
|
}
|