refactor(ui): enhance component className structure for better readability and maintainability

This commit is contained in:
Maximilian Liebmann 2025-05-30 19:45:49 +02:00
parent 8752598e8a
commit 08a728cbaa
9 changed files with 554 additions and 24 deletions

View file

@ -32,7 +32,37 @@ function HoverCardContent({
align={align}
sideOffset={sideOffset}
className={cn(
'bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',
/* Text */
'text-text',
/* Background */
'bg-popover',
/* Border */
'border rounded-md',
/* Font */
'',
/* Cursor */
'',
/* Ring */
'',
/* Outline */
'outline-hidden',
/* Shadow */
'shadow-md',
/* Opacity */
'',
/* Scaling */
'w-64',
/* Spacing */
'p-4',
/* Alignment */
'z-50',
/* Miscellanneous */
'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',
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',
'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
'origin-(--radix-hover-card-content-transform-origin)',
/* ////////// */
className,
)}
{...props}