Fix types, replace preact with react
This commit is contained in:
@@ -434,7 +434,7 @@ const SidebarGroupLabel = React.forwardRef<
|
||||
|
||||
return (
|
||||
<Comp
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="group-label"
|
||||
className={cn(
|
||||
"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
||||
@@ -455,7 +455,7 @@ const SidebarGroupAction = React.forwardRef<
|
||||
|
||||
return (
|
||||
<Comp
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="group-action"
|
||||
className={cn(
|
||||
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
||||
@@ -556,7 +556,7 @@ const SidebarMenuButton = React.forwardRef<
|
||||
|
||||
const button = (
|
||||
<Comp
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="menu-button"
|
||||
data-size={size}
|
||||
data-active={isActive}
|
||||
@@ -601,7 +601,7 @@ const SidebarMenuAction = React.forwardRef<
|
||||
|
||||
return (
|
||||
<Comp
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="menu-action"
|
||||
className={cn(
|
||||
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
||||
@@ -626,7 +626,7 @@ const SidebarMenuBadge = React.forwardRef<
|
||||
React.ComponentProps<"div">
|
||||
>(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="menu-badge"
|
||||
className={cn(
|
||||
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
|
||||
@@ -715,7 +715,7 @@ const SidebarMenuSubButton = React.forwardRef<
|
||||
|
||||
return (
|
||||
<Comp
|
||||
ref={ref}
|
||||
ref={ref as any}
|
||||
data-sidebar="menu-sub-button"
|
||||
data-size={size}
|
||||
data-active={isActive}
|
||||
|
||||
Reference in New Issue
Block a user