Skip to content

Commit 7bc7f39

Browse files
authored
Merge pull request #6 from ron0115/dev
Dev
2 parents c99f56a + a30c0b0 commit 7bc7f39

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
branches:
55
- master
6+
paths-ignore:
7+
- '**/README.md'
68
jobs:
79
build:
810
runs-on: ubuntu-latest

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a hook to control your scrollbar in react component!
44

5-
Basically; `useSmoothScroll` hook checks the `HTMLElement`'s API `scrollTo`, otherwise, use `requestAnimationFrame` to finish smooth scroll behaviour!
5+
Basically; `useSmoothScroll` hook use `requestAnimationFrame` to finish smooth scroll behaviour!
66

77
If you want to control the `speed` of scroll behaviour, it defaults to use `requestAnimationFrame` mode.
88

@@ -21,7 +21,7 @@ If you want to control the `speed` of scroll behaviour, it defaults to use `requ
2121
## Installation
2222

2323
```sh
24-
npm install react-smotth-scroll-hook
24+
npm install react-smooth-scroll-hook
2525
```
2626

2727
## Basic Usage
@@ -72,11 +72,11 @@ export const Demo = () => {
7272
- **scrollTo** `(string|number) => void`
7373

7474
- Pass `number`: the distance to scroll, e.g. `scrollTo(400)`
75-
- Pass `string`: the element seletor you want to scrollTo, passing to `document.querySelector`, e.g. `scrollTo('#your-dom-id')`
75+
- Pass `string`: the element seletor you want to scrollTo, meanwhile passing to `document.querySelector`, e.g. `scrollTo('#your-dom-id')`
7676

77-
- **reachTop** `boolean`: Whether it is reach top of scrollContainer
77+
- **reachTop** `boolean`: Whether it has reached the top of scrollContainer
7878

79-
- **reachBottom** `boolean`: Whether it is reach bottom of scrollContainer
79+
- **reachBottom** `boolean`: Whether it has reached the bottom of scrollContainer
8080

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

0 commit comments

Comments
 (0)