refactor: layout improvements; suggestions count increased up to 10

This commit is contained in:
ner committed 2023-08-05 16:11:20 +03:00
1 parent c605414f73
commit a4f420821a
8 files changed
+44 -30

No files matched your search

+3 -8
View File
@@ -2,7 +2,6 @@
import * as React from 'react';
import * as DialogPrimitive from '@radix-ui/react-dialog';
import { X } from 'lucide-react';
import { cn } from '@/lib/utils';
@@ -35,21 +34,17 @@ const DialogContent = React.forwardRef<
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<DialogPortal>
<DialogOverlay className='overflow-auto'>
<DialogOverlay className='overflow-auto flex justify-center'>
<DialogPrimitive.Content
ref={ref}
className={cn(
'absolute left-[50%] translate-x-[-50%] top-[20vh] max-w-[1000px] w-[calc(100%-24px)] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg',
'absolute top-[20vh] max-w-[1000px] w-[calc(100%-24px)] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg',
className
)}
{...props}
>
{children}
<DialogPrimitive.Close className='absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground'>
<X className='h-4 w-4' />
<span className='sr-only'>Close</span>
</DialogPrimitive.Close>
<DialogPrimitive.Close className='absolute w-full block h-[20vh]' />
<DialogPrimitive.Close type='button' autoFocus={false} className='absolute w-full block h-[20vh] outline-0' />
</DialogPrimitive.Content>
</DialogOverlay>
</DialogPortal>