Spaces:
Running
Running
File size: 563 Bytes
388e504 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import Markdown from "react-markdown";
export default function NodeDocumentation(props: any) {
if (!props.doc) return null;
return (
<div className="dropdown dropdown-hover dropdown-top dropdown-end title-icon">
{props.children}
<div className="node-documentation dropdown-content" style={{ width: props.width }}>
{props.doc.map?.(
(section: any, i: number) =>
section.kind === "text" && <Markdown key={i}>{section.value}</Markdown>,
) ?? <Markdown>{props.doc}</Markdown>}
</div>
</div>
);
}
|