Files
Gildas GarciaandIvan Vasilov 96d43099bb chore: refactor Button API so that it can be used a standard button (#46880)
## 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>
2026-06-16 23:59:58 +02:00

50 lines
1.6 KiB
TypeScript

import { ExternalLink } from 'lucide-react'
import { Button } from 'ui'
import {
ScaffoldSection,
ScaffoldSectionContent,
ScaffoldSectionDetail,
} from '@/components/layouts/Scaffold'
import { useTrack } from '@/lib/telemetry/track'
export const HIPAA = () => {
const track = useTrack()
return (
<ScaffoldSection className="py-12">
<ScaffoldSectionDetail>
<h4 className="mb-5">HIPAA</h4>
<div className="space-y-2 text-sm text-foreground-light [&_p]:m-0">
<p>
This is only for HIPAA requests. Please ignore this if you already have HIPAA enabled.
</p>
<p>
Organizations on the Team Plan or above are eligible for a paid HIPAA compliance add-on.
You can submit a request here and we will get back to you on the pricing and process for
your use case.
</p>
<p>
Organizations on the Free or Pro Plan can also submit a request for HIPAA. Note that you
are still required to upgrade to the Team Plan after your request is approved.
</p>
</div>
</ScaffoldSectionDetail>
<ScaffoldSectionContent>
<div className="@lg:flex items-center justify-center h-full">
<Button asChild variant="default" iconRight={<ExternalLink />}>
<a
href="https://forms.supabase.com/hipaa2"
target="_blank"
rel="noreferrer noopener"
onClick={() => track('hipaa_request_button_clicked')}
>
Request HIPAA
</a>
</Button>
</div>
</ScaffoldSectionContent>
</ScaffoldSection>
)
}