import type { RootContent } from "hast"; type Props = { node: RootContent; }; /** * # Render one node of a refractor hast tree */ export default function CodeBlockHastNode({ node }: Props) { if (node.type === "text") { return node.value; } if (node.type !== "element") { return null; } const className = node.properties?.className; return ( {node.children.map((child, index) => ( ))} ); }