Skip to content

Commit 8704c6a

Browse files
committed
docs: updated wording and information
1 parent 842db5b commit 8704c6a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ npm i --save-dev react-collapse-pane
1515
yarn add --dev react-collapse-pane
1616
```
1717

18-
Once installed you can import the `SplitPane` component in your code.
18+
Once installed you can import the `SplitPane` component.
1919

2020
```ts
2121
import { SplitPane } from "react-collapse-pane";
2222
```
2323

24-
If you're using Typescript the `SplitPaneProps`, as well as a few other helper types type is also available.
24+
If you're using Typescript the `SplitPaneProps`, and a few other helper types are also available.
2525
```ts
2626
import { SplitPane, SplitPaneProps, ResizerOptions, CollapseOptions, SplitPaneHooks } from "react-collapse-pane";
2727
```
2828
# Usage 👓
2929

30-
## The Basics 📘
30+
## The Basics - Laying Things Out 📘
3131

32-
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.
3333

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.
3535

3636
Here's a basic example:
3737
```tsx
@@ -43,15 +43,15 @@ Here's a basic example:
4343
</SplitPane>
4444
```
4545

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.
4747

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.
4949

5050
## Styling the Resizer 💅
5151

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.
5353

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.
5555

5656
!> **Note!** The css props must be valid `React.CSSProperties` objects.
5757

@@ -87,7 +87,7 @@ Here's an example:
8787

8888
!> This is the killer feature of this library :eyes:
8989

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`.
9191

9292
* `beforeToggleButton` - the element displayed as the collapse button **before** the panel is collapsed. This is an purely aesthetic component.
9393
* `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
9797
* `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`
9898
* `collapseSize` - the size of the collapsed panel after it has been collapsed
9999
* `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.
101101

102102
Here's an example using a `Button` element imported from elsewhere.
103103

@@ -121,7 +121,7 @@ Here's an example using a `Button` element imported from elsewhere.
121121
</SplitPane>
122122
```
123123

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!
125125

126126

127127
## Hooks and Saving State ⚡

0 commit comments

Comments
 (0)