File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/components/src/ui Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -280,11 +280,15 @@ const SidebarTrigger = React.forwardRef<
280280} )
281281SidebarTrigger . displayName = "SidebarTrigger"
282282
283- function SidebarRail ( { className, ...props } : React . ComponentProps < "button" > ) {
283+ const SidebarRail = React . forwardRef <
284+ HTMLButtonElement ,
285+ React . ComponentProps < "button" >
286+ > ( ( { className, ...props } , ref ) => {
284287 const { toggleSidebar } = useSidebar ( )
285288
286289 return (
287290 < button
291+ ref = { ref }
288292 data-sidebar = "rail"
289293 data-slot = "sidebar-rail"
290294 aria-label = "Toggle Sidebar"
@@ -303,7 +307,8 @@ function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
303307 { ...props }
304308 />
305309 )
306- }
310+ } )
311+ SidebarRail . displayName = "SidebarRail"
307312
308313function SidebarInset ( { className, ...props } : React . ComponentProps < "main" > ) {
309314 return (
You can’t perform that action at this time.
0 commit comments