Skip to content

Commit 0c7f7a2

Browse files
committed
chore: docs
1 parent e2ed09d commit 0c7f7a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `useSmoothScroll` hook finish smooth scroll behaviour in react component by
1010

1111
- 🚀 You don't need to warn about compatibility, it use `requsetAnimationFrame` api to finish smooth scroll behaviour.
1212

13-
- 👉 Provide `direction` option ,you can set `x` for vertical, `y` for horizontal.
13+
- 👉 Provide `direction` option ,you can set `x` for horizontal, `y` for vertical.
1414

1515
- 💧 No Third Party dependencies, light and pure.
1616

@@ -60,7 +60,7 @@ export const Demo = () => {
6060

6161
- **ref:** `RefObject<HTMLElement>`, container which set as `overflow: scroll`.
6262
- **speed:** Distance in one frame to move in `requestAnimationFrame` mode, defaults to `100`, if not provide, speed depends on native API `scrollTo`.
63-
- **direction:** Scroll direction
63+
- **direction:** Scroll direction, `x` for horizontal or `y` for vertical.
6464
- **threshold:** Judge scroll is finished has an error range, .defaults to `1`.
6565

6666
### Returns of Hook
@@ -70,13 +70,13 @@ export const Demo = () => {
7070
- Pass `number`: the distance to scroll, e.g. `scrollTo(400)`
7171
- Pass `string`: the element seletor you want to scrollTo, meanwhile passing to `document.querySelector`, e.g. `scrollTo('#your-dom-id')`
7272

73-
- **reachTop** `boolean`: Whether it has reached the top of scrollContainer
73+
- **reachTop** `boolean`: Whether it has reached the top of refContainer
7474

75-
- **reachBottom** `boolean`: Whether it has reached the bottom of scrollContainer
75+
- **reachBottom** `boolean`: Whether it has reached the bottom of refContainer
7676

7777
- **scrollToPage** `(number) => void`: Pass page(`number`), which scroll to a distance as multiples of container size(`offsetWidth`/`offsetHeight`)
7878
.e.g `scrollToPage(1)`,`scrollToPage(-1)`
7979

80-
- **refreshState** `() => void`: Manually refresh the state of `reachTop` and `reachBottom`, just an API as you need, and possibly useful in some situation.
80+
- **refreshState** `() => void`: Manually refresh the state of `reachTop` and `reachBottom`, possibly useful in some situation.
8181

82-
- **refreshSize** `() => void`: Manually refresh the size of ref container, just an API as you need, and possibly useful in some situation.
82+
- **refreshSize** `() => void`: Manually refresh the size of ref container, possibly useful in some situation.

0 commit comments

Comments
 (0)