sidebar-click-handler.tsx

src/components/sidebar-stack/sidebar-click-handler.tsx
'use client'
import type { ReactNode } from 'react'
import { useSidebarStack } from './context'
export interface SidebarClickHandlerProps {
children: ReactNode
className?: string
}
/**
* Wraps content and intercepts clicks on SidebarLink elements.
* Uses event delegation to push sidebar items without requiring
* hooks in the SidebarLink component itself.
*/
export function SidebarClickHandler({
children,
className,
}: SidebarClickHandlerProps) {
const { push } = useSidebarStack()

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC