Files
Danny White 476d4a5851 refactor(ui): drop redundant Button variant="default" props (#50161)
## What kind of change does this PR introduce?

Mechanical cleanup on top of the Button default-variant change (#50160).

## What is the current behavior?

Many callsites still pass `variant="default"` even though that is now
the component default.

## What is the new behavior?

Removes redundant static `variant="default"` from legacy `Button` and
`ButtonTooltip` callsites. Keeps explicit defaults where they document
the API:

- `button-default.tsx` and `button-sizes.tsx` demos
- `DocsButton`, which pins neutral styling at the wrapper boundary

## To test

Studio:

- [Auth → Rate
Limits](https://studio-staging-2s957kwc4-supabase.vercel.app/dashboard/project/_/auth/rate-limits):
dirty the form so Cancel appears; Cancel stays neutral, Save stays green
- [Project Settings → API
Keys](https://studio-staging-2s957kwc4-supabase.vercel.app/dashboard/project/_/settings/api-keys):
`DocsButton` in the header actions stays neutral

Design system:

- [Design system →
Button](https://design-system-git-dnywh-dc924ac1-supabase.vercel.app/design-system/docs/components/button):
`button-default` / `button-sizes` still show explicit default styling;
Primary (green) is restricted to the Primary section (and `asChild`)

WWW:

- [www → Brand
assets](https://zone-www-dot-com-git-dnywh-dc924ac1-supabase.vercel.app/brand-assets):
Download logo kit / Download button kit stay neutral
2026-09-11 17:05:26 +10:00

51 lines
1.7 KiB
TypeScript

import { Trash } 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={<Trash />} className="px-1" onClick={() => onSelectRevoke()} />
</TableCell>
</TableRow>
)
}