added udels editor and header
This commit is contained in:
parent
d23038d386
commit
6c9e0aaa1a
9 changed files with 190 additions and 7 deletions
23
website/src/repl/components/Code.jsx
Normal file
23
website/src/repl/components/Code.jsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue