klawdyoss's picture
salvando
8a0e39e
raw
history blame contribute delete
920 Bytes
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%" }) })] }));
}