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

59 lines
2.0 KiB
TypeScript

import {
Button,
Dialog,
DialogContent,
DialogHeader,
DialogSection,
DialogTitle,
DialogTrigger,
} from 'ui'
import { InlineLink } from '@/components/ui/InlineLink'
export const OptInToOpenAIToggle = () => {
return (
<Dialog>
<DialogTrigger asChild>
<Button variant="outline" className="w-fit">
Learn more about data privacy
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-2xl">
<DialogHeader padding="small" className="border-b">
<DialogTitle>Data Privacy and Supabase AI</DialogTitle>
</DialogHeader>
<DialogSection
padding="small"
className="flex flex-col gap-y-4 text-sm text-foreground-light"
>
<p>
Supabase AI utilizes third-party AI providers designed with a strong focus on data
privacy and security.
</p>
<p>
By default, only schema data is shared with third-party AI providers. This is not
retained by them nor used as training data. With your permission, Supabase may also
share customer-generated prompts, database data, and project logs with these providers.
This information is used solely to generate responses to your queries and is not
retained by the providers or used to train their models.
</p>
<p>
For organizations with HIPAA compliance enabled in their Supabase configuration, any
consented information will only be shared with third-party AI providers with whom
Supabase has established a Business Associate Agreement (BAA).
</p>
<p>
For more detailed information about how we collect and use your data, see our{' '}
<InlineLink href="https://supabase.com/privacy">Privacy Policy</InlineLink>. You can
choose which types of information you consent to share by selecting from the options in
the AI settings.
</p>
</DialogSection>
</DialogContent>
</Dialog>
)
}