A React component that separate two or more views with a draggable divider.
npm install react-split-layoutA React component that separate two or more views with a draggable divider.
Heavily inspired by react-split-pane by tomkp.
For the simplest case, just add two elements under a `SplitLayout:
`html`
You can have SplitLayout with either vertical or horizontal direction,
with multiple children, possibly nesting another SplitLayout, with constraints
on minimum/maximum sizes:
`html`
onChange={this.onChange}
initialSizes={[100, 300, 100, null]}
minSizes={[100, 100, 100, 100]}
maxSizes={[null, null, 600, null]}>
Hello
World
Foo
initialSizes={[50,null]}
onChange={this.onChange}>
Vertical 1
Vertical 2
SplitLayout accepts an onChange function prop. You may use it to persists the
changes of sizes and then use them in initialSizes` to restore the state.
MIT License