react-scroll-to-top
Advanced tools
Comparing version 2.0.3-beta.0 to 2.0.3-beta.1
{ | ||
"name": "react-scroll-to-top", | ||
"author": "Herman Nygaard", | ||
"version": "2.0.3-beta.0", | ||
"version": "2.0.3-beta.1", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
@@ -14,7 +14,13 @@ # react-scroll-to-top | ||
Run `npm i react-scroll-to-top` | ||
With npm: | ||
`npm i react-scroll-to-top` | ||
or with Yarn: | ||
`yarn add react-scroll-to-top` | ||
## Usage | ||
Import and then include `<ScrollToTop />` anywhere in your render/return function: | ||
Import and then add `<ScrollToTop />` at the bottom of your return function (for a11y reasons): | ||
@@ -27,4 +33,5 @@ ```js | ||
<div> | ||
<h1>Hello, world!</h1> | ||
<div style={{ marginTop: "150vh" }} /> | ||
<ScrollToTop smooth /> | ||
<h1>Hello, world!</h1> | ||
</div> | ||
@@ -31,0 +38,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16482
67