Files
supabase/apps/design-system/registry/default/example/page-layout-detail.tsx
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

156 lines
5.3 KiB
TypeScript

import Link from 'next/link'
import {
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
Button,
Card,
CardContent,
} from 'ui'
import { PageBreadcrumbs } from 'ui-patterns/PageBreadcrumbs'
import { PageContainer } from 'ui-patterns/PageContainer'
import {
PageHeader,
PageHeaderDescription,
PageHeaderMeta,
PageHeaderSummary,
PageHeaderTitle,
} from 'ui-patterns/PageHeader'
import {
PageSection,
PageSectionContent,
PageSectionDescription,
PageSectionMeta,
PageSectionSummary,
PageSectionTitle,
} from 'ui-patterns/PageSection'
export default function PageLayoutDetail() {
return (
<div className="w-full">
<PageBreadcrumbs>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink asChild>
<Link href="/org/demo">Organization</Link>
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Billing</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</PageBreadcrumbs>
<PageHeader size="default">
<PageHeaderMeta>
<PageHeaderSummary>
<PageHeaderTitle>Billing</PageHeaderTitle>
<PageHeaderDescription>
Manage your organization&apos;s billing and subscription settings.
</PageHeaderDescription>
</PageHeaderSummary>
</PageHeaderMeta>
</PageHeader>
<PageContainer size="default">
<PageSection orientation="horizontal">
<PageSectionMeta>
<PageSectionSummary>
<PageSectionTitle>Subscription</PageSectionTitle>
<PageSectionDescription>
View and manage your current subscription plan and billing cycle.
</PageSectionDescription>
</PageSectionSummary>
</PageSectionMeta>
<PageSectionContent>
<Card>
<CardContent className="p-6">
<div className="space-y-4">
<div>
<p className="text-xs text-foreground-lighter mb-1">Current Plan</p>
<p className="text-sm font-medium">Pro Plan</p>
</div>
<div>
<p className="text-xs text-foreground-lighter mb-1">Billing Cycle</p>
<p className="text-sm">Monthly</p>
</div>
<div>
<p className="text-xs text-foreground-lighter mb-1">Next Billing Date</p>
<p className="text-sm">March 15, 2024</p>
</div>
<div className="pt-2">
<Button size="small">Change Plan</Button>
</div>
</div>
</CardContent>
</Card>
</PageSectionContent>
</PageSection>
<PageSection orientation="horizontal">
<PageSectionMeta>
<PageSectionSummary>
<PageSectionTitle>Cost control</PageSectionTitle>
<PageSectionDescription>
Set spending limits and alerts to manage your organization&apos;s costs.
</PageSectionDescription>
</PageSectionSummary>
</PageSectionMeta>
<PageSectionContent>
<Card>
<CardContent className="p-6">
<div className="space-y-4">
<div>
<p className="text-xs text-foreground-lighter mb-1">Monthly Spending Limit</p>
<p className="text-sm">$500.00</p>
</div>
<div>
<p className="text-xs text-foreground-lighter mb-1">Current Month Spend</p>
<p className="text-sm">$234.50</p>
</div>
<div className="pt-2">
<Button size="small">Configure Limits</Button>
</div>
</div>
</CardContent>
</Card>
</PageSectionContent>
</PageSection>
<PageSection orientation="horizontal">
<PageSectionMeta>
<PageSectionSummary>
<PageSectionTitle>Payment Methods</PageSectionTitle>
<PageSectionDescription>
Manage payment methods and billing information for your organization.
</PageSectionDescription>
</PageSectionSummary>
</PageSectionMeta>
<PageSectionContent>
<Card>
<CardContent className="p-6">
<div className="space-y-4">
<div>
<p className="text-xs text-foreground-lighter mb-1">Primary Payment Method</p>
<p className="text-sm">•••• •••• •••• 4242</p>
</div>
<div>
<p className="text-xs text-foreground-lighter mb-1">Expires</p>
<p className="text-sm">12/2025</p>
</div>
<div className="pt-2">
<Button size="small">Update Payment Method</Button>
</div>
</div>
</CardContent>
</Card>
</PageSectionContent>
</PageSection>
</PageContainer>
</div>
)
}