You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only component you must interact with is `SplitPane`. This serves as a wrapper for the children you wish to layout in a panel form.
32
+
The only component you use is `SplitPane`. This is a wrapper for the children you wish to lay out in a panel form.
33
33
34
-
All you're required to give is a `split` prop which can be either `"horizontal"` or `"vertical"`. This identifies what the orientation of the split panel will be.
34
+
There is only 1 required prop, `split`, which can be either `"horizontal"` or `"vertical"`. This identifies what the orientation of the split panel will be.
35
35
36
36
Here's a basic example:
37
37
```tsx
@@ -43,15 +43,15 @@ Here's a basic example:
43
43
</SplitPane>
44
44
```
45
45
46
-
This will split the children. The children can be any valid React child. If a child is `null` it will be excluded from being split or displayed.
46
+
?> **Note** There is no limit to the number of divs you have as children. The `SplitPane`will split them all accordingly.
47
47
48
-
?> **Note** there is no limit to the number of divs you have as children. The `SplitPane`will split them all accordingly.
48
+
!> The children can be any valid React child, but if a child is `null` it will be excluded from being split or displayed.
49
49
50
50
## Styling the Resizer 💅
51
51
52
-
By default there is a 1px divider that starts out `rgba(120, 120, 120, 0.3)` and transitions to `rgba(120, 120, 120, 0.6)` on hover. Having a grey color with an alpha value means that it will look nice on both light and dark backgrounds.
52
+
By default there is a 1px divider with some basic CSS.
53
53
54
-
This is easily replaceable with the `css` and `hoverCss` options. No need to worry about pseudo selectors, transitions, animations or anything. You just have to indicate what the divider should look like **before** and **after**. This is accomplished by having two separate divs, one of which fades out and the other which fades in.
54
+
This is replaceable with the `css` and `hoverCss` options. No need to worry about pseudo selectors, transitions, animations or anything. You just have to indicate what the divider should look like **before** and **after**. This is accomplished by having two separate divs, one of which fades out and the other which fades in.
55
55
56
56
!> **Note!** The css props must be valid `React.CSSProperties` objects.
57
57
@@ -87,7 +87,7 @@ Here's an example:
87
87
88
88
!> This is the killer feature of this library :eyes:
89
89
90
-
It's a common UX need to want to collapse the left or initial panel to give more room for another part of a site or app. This is easily accomplished by including several `CollapseOptions` as a prop to the `SplitPane`.
90
+
It's a common need to want to collapse the left or initial panel to give more room for another part of a site or app. This is easily accomplished by including several `CollapseOptions` as a prop to the `SplitPane`.
91
91
92
92
*`beforeToggleButton` - the element displayed as the collapse button **before** the panel is collapsed. This is an purely aesthetic component.
93
93
*`afterToggleButton` - the element displayed as the collapse button **after** the panel is collapsed. This is an purely aesthetic component.
@@ -97,7 +97,7 @@ It's a common UX need to want to collapse the left or initial panel to give more
97
97
*`collapseDirection` - `'left' | 'right' | 'up' | 'down'` - this is used to indicate the direction that it should collapse. By default collapsing happens left and up for the vertical and horizontal splits respectively. Valid values for a vertical split are `left` or `right` and valid values for a horizontal split are `up` or `down`
98
98
*`collapseSize` - the size of the collapsed panel after it has been collapsed
99
99
*`collapseTransitionTimeout` - the duration within the collapse animation will take place
100
-
*`overlayCss` - the css applied to a div positioned on top of the content.
100
+
*`overlayCss` - the css applied to a div positioned on top of the content. The overlay div has an initial opacity of zero which transitions to 1 over the course of the collapse.
101
101
102
102
Here's an example using a `Button` element imported from elsewhere.
103
103
@@ -121,7 +121,7 @@ Here's an example using a `Button` element imported from elsewhere.
121
121
</SplitPane>
122
122
```
123
123
124
-
?> **Note!**:eyes:When collapsing a panel, the `minSize` value is used to freeze the width of the collapsed panel to its minimum size and hides the rest of the content. This allows for a smooth collapse animation and is something to keep in mind. Until the animation reaches the min size it will shrink the panel as normal. Try it out for yourself!
124
+
?> **Note!** When collapsing a panel, the `minSize` value is used to freeze the width of the collapsed panel to its minimum size and hides the rest of the content. This allows for a smooth collapse animation and is something to keep in mind. Until the animation reaches the min size it will shrink the panel as normal. Try it out for yourself!
0 commit comments