import React, { useEffect } from 'react'; interface BottomSheetProps { open: boolean; title?: string; onClose: () => void; children: React.ReactNode; height?: 'auto' | 'half' | 'full'; } export default function BottomSheet({ open, title, onClose, children, height = 'auto', }: BottomSheetProps) { useEffect(() => { if (!open) return; const prev = document.body.style.overflow; document.body.style.overflow = 'hidden'; return () => { document.body.style.overflow = prev; }; }, [open]); if (!open) return null; return (
)}
{children}
); }