UNPKG

@theguild/components

Version:
23 lines (22 loc) 545 B
"use client"; import { jsx } from "react/jsx-runtime"; import { usePathname } from "next/navigation"; import { cn } from "../cn"; const Body = ({ lightOnlyPages, children, className, ...rest }) => { const pathname = usePathname(); const isLightOnlyPage = lightOnlyPages.includes(pathname); return /* @__PURE__ */ jsx( "body", { className: cn( className, isLightOnlyPage && "light text-green-1000 [&_#h-navmenu-container]:max-w-[1392px]" ), ...rest, children } ); }; export { Body };