Revert AlerDialog implementation

This commit is contained in:
yangdx
2025-03-26 18:22:18 +08:00
parent 10245462f1
commit 208ee8b577
2 changed files with 3 additions and 4 deletions

View File

@@ -5,8 +5,7 @@ import {
AlertDialogContent, AlertDialogContent,
AlertDialogDescription, AlertDialogDescription,
AlertDialogHeader, AlertDialogHeader,
AlertDialogTitle, AlertDialogTitle
AlertDialogOverlay
} from '@/components/ui/AlertDialog' } from '@/components/ui/AlertDialog'
import Button from '@/components/ui/Button' import Button from '@/components/ui/Button'
import Input from '@/components/ui/Input' import Input from '@/components/ui/Input'
@@ -51,7 +50,6 @@ const ApiKeyAlert = ({ open: opened, onOpenChange: setOpened }: ApiKeyAlertProps
return ( return (
<AlertDialog open={opened} onOpenChange={setOpened}> <AlertDialog open={opened} onOpenChange={setOpened}>
<AlertDialogOverlay className="bg-black/30" />
<AlertDialogContent> <AlertDialogContent>
<AlertDialogHeader> <AlertDialogHeader>
<AlertDialogTitle>{t('apiKeyAlert.title')}</AlertDialogTitle> <AlertDialogTitle>{t('apiKeyAlert.title')}</AlertDialogTitle>

View File

@@ -16,7 +16,7 @@ const AlertDialogOverlay = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Overlay <AlertDialogPrimitive.Overlay
className={cn( className={cn(
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
className className
)} )}
{...props} {...props}
@@ -30,6 +30,7 @@ const AlertDialogContent = React.forwardRef<
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<AlertDialogPortal> <AlertDialogPortal>
<AlertDialogOverlay />
<AlertDialogPrimitive.Content <AlertDialogPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(