File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,3 +171,12 @@ select {
171171 outline : none;
172172 box-shadow : 0 0 0 3px rgb (32 35 32 / 0.12 );
173173}
174+
175+ .dashboard-scrollbar-hidden {
176+ -ms-overflow-style : none;
177+ scrollbar-width : none;
178+ }
179+
180+ .dashboard-scrollbar-hidden ::-webkit-scrollbar {
181+ display : none;
182+ }
Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ describe("SidebarNav", () => {
6464 expect ( within ( sidebar ) . getByRole ( "button" , { name : "Collapse sidebar" } ) ) . toHaveClass ( "lg:grid" ) ;
6565 } ) ;
6666
67+ it ( "hides the desktop navigation scrollbar without disabling vertical scroll" , ( ) => {
68+ renderSidebar ( ) ;
69+
70+ const nav = screen . getByLabelText ( "Dashboard navigation" ) ;
71+ expect ( nav ) . toHaveClass ( "overflow-y-auto" ) ;
72+ expect ( nav ) . toHaveClass ( "dashboard-scrollbar-hidden" ) ;
73+ } ) ;
74+
6775 it ( "wraps mobile navigation chips instead of relying on horizontal scrolling" , ( ) => {
6876 renderSidebar ( ) ;
6977
Original file line number Diff line number Diff line change @@ -365,7 +365,10 @@ export function SidebarNav({
365365 </ button >
366366 </ div >
367367
368- < nav aria-label = "Dashboard navigation" className = "mt-5 flex-1 space-y-4 overflow-y-auto pb-4" >
368+ < nav
369+ aria-label = "Dashboard navigation"
370+ className = "dashboard-scrollbar-hidden mt-5 flex-1 space-y-4 overflow-y-auto pb-4"
371+ >
369372 { sections . map ( ( section ) => (
370373 < div key = { section . id } className = "space-y-2" >
371374 < p className = { sectionLabelClass } > { section . label } </ p >
You can’t perform that action at this time.
0 commit comments