1
0
silverbullet/webapp/components/panel.tsx
2022-03-28 15:25:05 +02:00

13 lines
290 B
TypeScript

import { useRef } from "react";
export function Panel({ html }: { html: string }) {
const iFrameRef = useRef<HTMLIFrameElement>(null);
// @ts-ignore
window.iframeRef = iFrameRef;
return (
<div className="panel">
<iframe srcDoc={html} ref={iFrameRef} />
</div>
);
}