A component with a resizable and splittable workspace. A panel with draggable tabs.
npm install react-workspacesreact-workspace
=========================
A fusion between [react-tabs][react-tabs] and [react-split-pane][react-split-pane].
``js
// A representation of the panel structure
const root = {
axis: 'x',
size: 50,
children: [
{
size: 50,
axis: 'y',
children: [
{},
{}
]
},
{}
]
};
const components = {
green: (
const tabs = {
// keys are paths of root,
// values are representations of tabs
'children[0].children[0]': ['green', 'red'], // if it is an array, then it will be a tab
'children[0].children[1]': 'blue', // if not, just render the component itself
'children[1]': ['yellow', 'red']
}
const workspace = (
);
``
[react-split-pane]: https://github.com/tomkp/react-split-pane
[react-tabs]: https://github.com/reactjs/react-tabs