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

43 lines
1.3 KiB
TypeScript

import { Download } from 'lucide-react'
import { Button } from 'ui'
import {
ScaffoldSection,
ScaffoldSectionContent,
ScaffoldSectionDetail,
} from '@/components/layouts/Scaffold'
import { useTrack } from '@/lib/telemetry/track'
export const TIA = () => {
const track = useTrack()
return (
<ScaffoldSection className="py-12">
<ScaffoldSectionDetail>
<h4 className="mb-5">Transfer Impact Assessment (TIA)</h4>
<div className="space-y-2 text-sm text-foreground-light [&_p]:m-0">
<p>
All organizations can access and use our TIA as part of their GDPR-compliant data
transfer process.
</p>
</div>
</ScaffoldSectionDetail>
<ScaffoldSectionContent>
<div className="@lg:flex items-center justify-center h-full">
<Button asChild variant="default" iconRight={<Download />}>
<a
href="https://supabase.com/downloads/docs/Supabase+TIA+250314.pdf"
target="_blank"
rel="noreferrer noopener"
download={true}
onClick={() => track('document_view_button_clicked', { documentName: 'TIA' })}
>
Download TIA
</a>
</Button>
</div>
</ScaffoldSectionContent>
</ScaffoldSection>
)
}