React-based window split management, used by Oni.
yarn add oni-core-window-manager
[Demo]
import * as React from "react"
import * as ReactDOM from "react-dom"
import { WindowManager, WindowSplitsView } from "oni-core-window-manager"
const myTestWindow = (message) {
render: () => <div>{message}</div>
}
const windowManager = new WindowManager()
const split1 = windowManager.createSplit("horizontal", myTestWindow("hello world"))
const split2 = windowManager.createSplit("horizontal", myTestWindow("another split"))
const split3 = windowManager.createSplit("vertical", myTestWindow("split3"))
split3.focus()
windowManager.move("up")
ReactDOM.render(<WindowSplitsView manager={windowManager} />, document.body)
This project is licensed under the MIT License. Copyright 2018 Bryan Phelps.