mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 03:45:06 +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>
25 lines
960 B
TypeScript
25 lines
960 B
TypeScript
import Link from 'next/link'
|
|
import { Button } from 'ui'
|
|
|
|
export function Hero() {
|
|
return (
|
|
<header className="container relative mx-auto px-6 pt-12 pb-8 lg:pt-24 lg:px-16 xl:px-20 text-center space-y-4">
|
|
<h1 className="text-sm text-brand-link md:text-base">
|
|
<span className="sr-only">Supabase </span>Contribute
|
|
</h1>
|
|
<h2 className="text-3xl md:text-4xl xl:text-5xl lg:max-w-2xl xl:max-w-6xl lg:mx-auto tracking-[-1px]">
|
|
Join the Supabase <br />
|
|
Contributor Community
|
|
</h2>
|
|
<p className="text-sm md:text-base text-foreground-lighter max-w-sm sm:max-w-md md:max-w-xl mx-auto">
|
|
Jump in to these unresolved threads and share your knowledge with fellow builders. Every
|
|
question answered helps someone build something amazing.
|
|
</p>
|
|
|
|
<Button size="medium" asChild variant="outline">
|
|
<Link href="/contribute/about">Get involved</Link>
|
|
</Button>
|
|
</header>
|
|
)
|
|
}
|