dockview-react 6.3.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -6
- package/dist/dockview-react.js +2 -2
- package/dist/dockview-react.min.js +2 -2
- package/dist/package/main.cjs.js +1 -1
- package/dist/package/main.cjs.min.js +1 -1
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +1 -1
- package/dist/styles/dockview.css +117 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>dockview-react</h1>
|
|
3
3
|
|
|
4
|
-
<p>
|
|
4
|
+
<p>React bindings for dockview — zero dependency layout manager supporting tabs, groups, grids and splitviews</p>
|
|
5
5
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
@@ -26,6 +26,7 @@ Please see the website: https://dockview.dev
|
|
|
26
26
|
- Support for split-views, grid-views and 'dockable' views
|
|
27
27
|
- Themeable and customizable
|
|
28
28
|
- Tab and Group docking / Drag n' Drop
|
|
29
|
+
- Touch & mobile support
|
|
29
30
|
- Popout Windows
|
|
30
31
|
- Floating Groups
|
|
31
32
|
- Edge Groups
|
|
@@ -39,18 +40,44 @@ Please see the website: https://dockview.dev
|
|
|
39
40
|
|
|
40
41
|
## Quick Start
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
Dockview has a peer dependency on `react >= 16.8.0` and `react-dom >= 16.8.0`. Install from [npm](https://www.npmjs.com/package/dockview-react):
|
|
43
44
|
|
|
44
45
|
```
|
|
45
|
-
npm install dockview
|
|
46
|
+
npm install dockview-react
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
Import the stylesheet:
|
|
49
50
|
|
|
51
|
+
```css
|
|
52
|
+
@import 'dockview-react/dist/styles/dockview.css';
|
|
50
53
|
```
|
|
51
|
-
|
|
54
|
+
|
|
55
|
+
Apply a theme and render the component:
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { DockviewReact } from 'dockview-react';
|
|
59
|
+
|
|
60
|
+
const components = {
|
|
61
|
+
myComponent: (props) => <div>Hello World</div>,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
function App() {
|
|
65
|
+
return (
|
|
66
|
+
<div className="dockview-theme-dark" style={{ height: '400px' }}>
|
|
67
|
+
<DockviewReact
|
|
68
|
+
components={components}
|
|
69
|
+
onReady={(event) => {
|
|
70
|
+
event.api.addPanel({
|
|
71
|
+
id: 'panel_1',
|
|
72
|
+
component: 'myComponent',
|
|
73
|
+
});
|
|
74
|
+
}}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
52
79
|
```
|
|
53
80
|
|
|
54
|
-
See the [
|
|
81
|
+
See the [documentation](https://dockview.dev) for full examples.
|
|
55
82
|
|
|
56
83
|
Want to verify our builds? Go [here](https://www.npmjs.com/package/dockview-react#Provenance).
|