The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Switch the alert to the new Shadcn one.
Ivan Vasilovb00be7e247cf
diff --git a/packages/ui/src/components/shadcn/ui/alert.tsx b/packages/ui/src/components/shadcn/ui/alert.tsxindex 485aee47a6c..e575c62b471 100644--- a/packages/ui/src/components/shadcn/ui/alert.tsx+++ b/packages/ui/src/components/shadcn/ui/alert.tsx@@ -3,9 +3,10 @@ import { cva, type VariantProps } from 'class-variance-authority'import { cn } from '@ui/lib/utils'+// Ivan: replaced [&:has(svg)]:pl-14 with [&>svg~*]:pl-10 cause of github.com/shadcn-ui/ui/issues/998const alertVariants = cva(cn(- 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-14 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',+ 'relative w-full rounded-lg border p-4 [&>svg~*]:pl-10 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground','[&>svg]:w-[23px] [&>svg]:h-[23px] [&>svg]:p-1 [&>svg]:flex [&>svg]:rounded'),{diff --git a/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx b/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsxindex e2081b9e915..ffdf95f359d 100644--- a/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx+++ b/studio/components/interfaces/Auth/SmtpForm/SmtpForm.tsx@@ -1,7 +1,20 @@import { PermissionAction } from '@supabase/shared-types/out/constants'import { observer } from 'mobx-react-lite'import { useEffect, useState } from 'react'-import { Alert, Button, Form, IconEye, IconEyeOff, Input, InputNumber, Toggle } from 'ui'++import {+ AlertDescription_Shadcn_,+ AlertTitle_Shadcn_,+ Alert_Shadcn_,+ Button,+ Form,+ IconAlertTriangle,+ IconEye,+ IconEyeOff,+ Input,+ InputNumber,+ Toggle,+} from 'ui'import { number, object, string } from 'yup'import {@@ -183,25 +196,34 @@ const SmtpForm = () => {{enableSmtp ? (!isValidSmtpConfig && (<div className="mx-8 mb-8 -mt-4">- <Alert withIcon variant="warning" title="All fields below must be filled">- The following fields must be filled before custom SMTP can be properly enabled- </Alert>+ <Alert_Shadcn_ variant="warning">+ <IconAlertTriangle strokeWidth={2} />+ <AlertTitle_Shadcn_>All fields below must be filled</AlertTitle_Shadcn_>+ <AlertDescription_Shadcn_>+ The following fields must be filled before custom SMTP can be properly+ enabled+ </AlertDescription_Shadcn_>+ </Alert_Shadcn_></div>)) : (<div className="mx-8 mb-8 -mt-4">- <Alert withIcon variant="warning" title="Built-in email service is rate-limited!">- You're using the built-in email service. The service has rate limits and it's- not meant to be used for production apps. Check the{' '}- <a- href="https://supabase.com/docs/guides/platform/going-into-prod#auth-rate-limits"- className="underline"- >- documentation- </a>{' '}- for an up-to-date information on the current rate limits. Please use a custom- SMTP server if you're planning on having large number of users.- </Alert>+ <Alert_Shadcn_ variant="warning">+ <IconAlertTriangle strokeWidth={2} />+ <AlertTitle_Shadcn_>Built-in email service is rate-limited!</AlertTitle_Shadcn_>+ <AlertDescription_Shadcn_>+ You're using the built-in email service. The service has rate limits and it's+ not meant to be used for production apps. Check the{' '}+ <a+ href="https://supabase.com/docs/guides/platform/going-into-prod#auth-rate-limits"+ className="underline"+ >+ documentation+ </a>{' '}+ for an up-to-date information on the current rate limits. Please use a custom+ SMTP server if you're planning on having large number of users.+ </AlertDescription_Shadcn_>+ </Alert_Shadcn_></div>)}