@smakss/react-scroll-direction 1.0.1 → 1.0.3
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 +4 -4
- package/package.json +2 -2
package/Readme.md
CHANGED
|
@@ -6,6 +6,10 @@ This is a custom hook for react which is useful to detect scroll direction in Re
|
|
|
6
6
|
|
|
7
7
|
This package is created on behalf of a [StackOverflow answer](https://stackoverflow.com/a/62497293/11908502) which draws some attention to itself, so if someone just wants something to work with right away, they can access it easily here.
|
|
8
8
|
|
|
9
|
+
## Demo
|
|
10
|
+
|
|
11
|
+
[](https://codesandbox.io/s/react-scroll-direction-tclwvp?fontsize=14&hidenavigation=1&theme=dark)
|
|
12
|
+
|
|
9
13
|
## How it works?
|
|
10
14
|
|
|
11
15
|
To install it you can simply do the following command:
|
|
@@ -55,7 +59,3 @@ const [scrollDir] = useDetectScroll({ axis: "x" });
|
|
|
55
59
|
|
|
56
60
|
// scrollDir: "left"/"right"
|
|
57
61
|
```
|
|
58
|
-
|
|
59
|
-
## Demo
|
|
60
|
-
|
|
61
|
-
[](https://codesandbox.io/s/react-scroll-direction-tclwvp?fontsize=14&hidenavigation=1&theme=dark)
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"description": "Detect scroll direction in react applications.",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@rollup/plugin-commonjs": "^
|
|
8
|
+
"@rollup/plugin-commonjs": "^24.0.0",
|
|
9
9
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
10
10
|
"prop-types": "^15.8.1",
|
|
11
11
|
"rollup": "^3.2.3"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"generate": "rollup -c"
|
|
47
47
|
},
|
|
48
48
|
"type": "module",
|
|
49
|
-
"version": "1.0.
|
|
49
|
+
"version": "1.0.3"
|
|
50
50
|
}
|