File size: 920 Bytes
20ec4ad
 
 
8a0e39e
 
 
 
 
 
20ec4ad
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import Editor from "@monaco-editor/react";
import Tabs from "../tabs/tabs";
export default function EditorPanel({ html, setHtml, isAiWorking, setError, editorRef, }) {
    return (_jsxs("div", { className: "h-full flex flex-col", children: [_jsx(Tabs, {}), _jsx("div", { className: "flex-1", children: _jsx(Editor, { language: "html", theme: "vs-dark", value: html, onValidate: (markers) => setError(markers.length > 0), onChange: (v) => setHtml(v ?? ""), onMount: (editor) => {
                        if (editorRef) {
                            editorRef.current = editor;
                        }
                    }, options: {
                        readOnly: isAiWorking,
                        minimap: { enabled: false },
                        scrollBeyondLastLine: false,
                    }, width: "100%", height: "100%" }) })] }));
}