@gfazioli/mantine-split-pane 2.7.0 → 2.7.2
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 +39 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,45 @@ function Demo() {
|
|
|
107
107
|
}
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
+
### Dynamic Panes
|
|
111
|
+
|
|
112
|
+
You can also use `Split.Dynamic` to create panes from a configuration array:
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Split, PaneConfig } from '@gfazioli/mantine-split-pane';
|
|
116
|
+
import { Paper } from '@mantine/core';
|
|
117
|
+
|
|
118
|
+
function Demo() {
|
|
119
|
+
const panes: PaneConfig[] = [
|
|
120
|
+
{
|
|
121
|
+
id: 'sidebar',
|
|
122
|
+
initialWidth: 200,
|
|
123
|
+
minWidth: 150,
|
|
124
|
+
content: (
|
|
125
|
+
<Paper withBorder w="100%" h="100%">
|
|
126
|
+
<h1>Sidebar</h1>
|
|
127
|
+
</Paper>
|
|
128
|
+
),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 'main',
|
|
132
|
+
grow: true,
|
|
133
|
+
content: (
|
|
134
|
+
<Paper withBorder w="100%" h="100%">
|
|
135
|
+
<h1>Main Content</h1>
|
|
136
|
+
</Paper>
|
|
137
|
+
),
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<Split>
|
|
143
|
+
{Split.Dynamic({ panes })}
|
|
144
|
+
</Split>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
110
149
|
## Sponsor
|
|
111
150
|
|
|
112
151
|
<div align="center">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfazioli/mantine-split-pane",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "A React component that manages split panes allows users to divide and resize content areas within a layout efficiently.",
|
|
5
5
|
"homepage": "https://gfazioli.github.io/mantine-split-pane/",
|
|
6
6
|
"packageManager": "yarn@4.0.1",
|