feat: 修改样式

This commit is contained in:
2025-08-13 01:51:01 -07:00
parent 59d180075b
commit a918cdab68
11 changed files with 299 additions and 305 deletions
+5 -3
View File
@@ -51,14 +51,16 @@ const sheetVariants = cva(
interface SheetContentProps
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
VariantProps<typeof sheetVariants> {}
VariantProps<typeof sheetVariants> {
overlayClassName?: string;
}
const SheetContent = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Content>,
SheetContentProps
>(({ side = 'right', className, children, ...props }, ref) => (
>(({ side = 'right', className, overlayClassName, children, ...props }, ref) => (
<SheetPortal>
<SheetOverlay />
<SheetOverlay className={overlayClassName} />
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
<SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none'>
<X className='h-4 w-4' />
@@ -209,6 +209,7 @@ const Sidebar = React.forwardRef<
'bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden',
className,
)}
overlayClassName={'bg-white/30 backdrop-blur-sm'}
style={
{
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,