Skip to content

Commit

Permalink
fix(sidebar): only apply text-sidebar-foreground to sidebar
Browse files Browse the repository at this point in the history
The text-sidebar-foreground class was applied to the SidebarProvider, which makes the whole page inherit its font color 

Of the 3 possible return cases in the Sidebar component, 2 already applied the text-sidebar-foreground and I have added it to the third
  • Loading branch information
jacobparis authored Oct 21, 2024
1 parent 630afe8 commit 654a8af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/www/registry/default/ui/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const SidebarProvider = React.forwardRef<
} as React.CSSProperties
}
className={cn(
"group/sidebar-wrapper flex min-h-svh w-full text-sidebar-foreground has-[[data-variant=inset]]:bg-sidebar",
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
className
)}
ref={ref}
Expand Down Expand Up @@ -216,7 +216,7 @@ const Sidebar = React.forwardRef<
return (
<div
ref={ref}
className="group peer hidden md:block"
className="group peer hidden md:block text-sidebar-foreground"
data-state={state}
data-collapsible={state === "collapsed" ? collapsible : ""}
data-variant={variant}
Expand Down

0 comments on commit 654a8af

Please sign in to comment.