1
0
silverbullet/webapp/components/panel.tsx

13 lines
290 B
TypeScript
Raw Normal View History

2022-03-28 13:25:05 +00:00
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>
);
}