renderer.tsx

src/components/sidebar-stack/renderer.tsx
'use client'
import { useRef, useEffect, useState, useCallback, type ReactNode } from 'react'
import clsx from 'clsx'
import xMarkIcon from '@iconify/icons-heroicons/x-mark'
import { Icon } from '@/components/icon'
import { useSidebarStack, type SidebarItem } from './context'
/** Lock body scroll when sidebar is open */
function useBodyScrollLock(isLocked: boolean) {
useEffect(() => {
if (!isLocked) return
const original = document.body.style.overflow
document.body.style.overflow = 'hidden'
return () => {
document.body.style.overflow = original
}
}, [isLocked])
}

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