mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
## Problem Our `<Button>` component breaks the default `button` contract by redefining the `type` prop to set its variant (`primary`, `default`, etc) instead of the button type (`submit`, `button`, etc). This is confusing and forces to write more code when using it with shadcn components that expect/inject the standard button props. ## Solution - rename the `type` prop to `variant` - rename the `htmlType` prop to `type` - propagate the changes where necessary - format code ## How to test As this is just prop renaming, if it builds it's ok --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { ExternalLink, HelpCircle } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
import { Alert, AlertDescription, AlertTitle, Button } from 'ui'
|
|
|
|
export const IPV4SuggestionAlert = () => {
|
|
return (
|
|
<Alert variant="default">
|
|
<HelpCircle strokeWidth={2} />
|
|
<AlertTitle>Connection issues?</AlertTitle>
|
|
<AlertDescription className="grid gap-3">
|
|
<p>
|
|
Having trouble connecting to your project? It could be related to our migration from
|
|
PGBouncer and IPv4.
|
|
</p>
|
|
<p>
|
|
Please review this GitHub discussion. It's up to date and covers many frequently asked
|
|
questions.
|
|
</p>
|
|
<p>
|
|
<Button asChild variant="default" icon={<ExternalLink strokeWidth={1.5} />}>
|
|
<Link
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
href="https://github.com/orgs/supabase/discussions/17817"
|
|
>
|
|
PGBouncer and IPv4 Deprecation #17817
|
|
</Link>
|
|
</Button>
|
|
</p>
|
|
</AlertDescription>
|
|
</Alert>
|
|
)
|
|
}
|