added udels editor and header

This commit is contained in:
Jade (Rose) Rowland 2024-06-14 01:24:08 -04:00
parent d23038d386
commit 6c9e0aaa1a
9 changed files with 190 additions and 7 deletions

View file

@ -0,0 +1,23 @@
// type Props = {
// containerRef: React.MutableRefObject<HTMLElement | null>,
// editorRef: React.MutableRefObject<HTMLElement | null>,
// init: () => void
// }
export function Code(Props) {
const {editorRef, containerRef, init} = Props;
return (
<section
className={'text-gray-100 cursor-text pb-0 overflow-auto grow'}
id="code"
ref={(el) => {
containerRef.current = el;
if (!editorRef.current) {
init();
}
}}
></section>
);
}