2023-09-19 20:46:46 +08:00
|
|
|
import React from "react";
|
|
|
|
import Diagram from "../components/diagram";
|
2023-09-19 20:46:48 +08:00
|
|
|
import Header from "../components/header";
|
|
|
|
import Sidebar from "../components/sidebar";
|
2023-09-19 20:46:46 +08:00
|
|
|
import { ResizableBox } from "react-resizable";
|
|
|
|
import "react-resizable/css/styles.css";
|
2023-09-19 20:46:48 +08:00
|
|
|
import ControlPanel from "../components/control_panel";
|
2023-09-19 20:46:46 +08:00
|
|
|
|
|
|
|
export default function Editor(props) {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Header name={props.name} />
|
2023-09-19 20:46:48 +08:00
|
|
|
<ControlPanel/>
|
|
|
|
<div className="flex h-full">
|
2023-09-19 20:46:46 +08:00
|
|
|
<ResizableBox
|
|
|
|
width={window.innerWidth * 0.2}
|
|
|
|
height={window.innerHeight}
|
|
|
|
resizeHandles={["e"]}
|
|
|
|
minConstraints={[window.innerWidth * 0.2, window.innerHeight]}
|
|
|
|
maxConstraints={[Infinity, Infinity]}
|
|
|
|
axis="x"
|
|
|
|
>
|
|
|
|
<span className="text">window 1</span>
|
|
|
|
</ResizableBox>
|
2023-09-19 20:46:48 +08:00
|
|
|
<div className="flex-grow">
|
2023-09-19 20:46:46 +08:00
|
|
|
<Diagram />
|
|
|
|
</div>
|
2023-09-19 20:46:48 +08:00
|
|
|
<Sidebar/>
|
2023-09-19 20:46:46 +08:00
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|