// src/react/shadow.ts // Generated by scripts/generate-adapters.ts. Do not edit. "use client"; import * as React from "react"; import { getPrefix, isBrowser } from "../elements/adapter"; type Renderer = (tag: string, props: Record, children: React.ReactNode, prefix: string) => string | undefined; export const shadow = (tag: string, props: Record, children: React.ReactNode): React.ReactNode => { if (isBrowser) return null; const render = (globalThis as unknown as Record)[Symbol.for("mtrl.ssr")]?.react; const html = render?.(tag, props, children, getPrefix()); return html === undefined ? null : React.createElement("template", { shadowrootmode: "open", shadowrootdelegatesfocus: "", dangerouslySetInnerHTML: { __html: html }, }); };