refactor: migrate shared infrastructure, home and industries features
This commit is contained in:
14
src/shared/layout/BodyOverlay.tsx
Normal file
14
src/shared/layout/BodyOverlay.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { useHeaderUI } from "./HeaderUIProvider";
|
||||
|
||||
/**
|
||||
* Production: `<div class="body-overlay"></div>` is a direct child of body
|
||||
* (rendered by both index.php line 6 and header.php line 5 — production has two; we render one).
|
||||
* CSS (consolidated into /public/css/site.css) styles it as fixed-position fullscreen overlay.
|
||||
*/
|
||||
export default function BodyOverlay() {
|
||||
const { isMenuOpen, isSidebarOpen, closeAll } = useHeaderUI();
|
||||
const active = isMenuOpen || isSidebarOpen;
|
||||
return <div className={`body-overlay${active ? " active" : ""}`} onClick={closeAll} />;
|
||||
}
|
||||
Reference in New Issue
Block a user