2023-09-19 20:46:44 +08:00
|
|
|
import Diagram from "./diagram";
|
|
|
|
import { ResizableBox } from "react-resizable";
|
|
|
|
import "react-resizable/css/styles.css";
|
2023-09-19 20:46:33 +08:00
|
|
|
|
|
|
|
function App() {
|
|
|
|
return (
|
2023-09-19 20:46:44 +08:00
|
|
|
<div className="flex">
|
|
|
|
<ResizableBox
|
|
|
|
width={window.innerWidth * 0.2}
|
|
|
|
height={window.innerHeight}
|
|
|
|
resizeHandles={["e"]}
|
|
|
|
minConstraints={[window.innerWidth * 0.2, window.innerHeight]}
|
|
|
|
axis="x"
|
|
|
|
>
|
|
|
|
<span className="text">window 1</span>
|
|
|
|
</ResizableBox>
|
|
|
|
<ResizableBox
|
|
|
|
width={window.innerWidth * 0.8}
|
|
|
|
height={window.innerHeight}
|
|
|
|
resizeHandles={[]}
|
|
|
|
>
|
|
|
|
<Diagram />
|
|
|
|
</ResizableBox>
|
|
|
|
</div>
|
2023-09-19 20:46:33 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|