Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
676 B ยท 31 lines
TSX
1234567891011121314151617181920212223242526272829303132"use client";
import { cn } from "@openstatus/ui/lib/utils";
import { ALL_EMBED_SECTIONS, useEmbed } from "../../hooks/use-embed";
export function EmbedShell({ children, className, ...props}: React.ComponentProps<"div">) { const { mode, sections } = useEmbed(); const hideAttrs = ALL_EMBED_SECTIONS.reduce<Record<string, "true">>( (acc, section) => { if (!sections.includes(section)) acc[`data-hide-${section}`] = "true"; return acc; }, {}, );
return ( <div {...props} data-embed={mode ? "true" : undefined} className={cn("group/embed", className)} {...hideAttrs} > {children} </div> );}