Skip to content

Commit 48760a2

Browse files
committed
Chore: Update readme
1 parent fc73d7e commit 48760a2

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# scroll-into-view-if-needed
2-
3-
[![npm package](https://img.shields.io/npm/dm/scroll-into-view-if-needed.svg)](https://www.npmjs.com/package/scroll-into-view-if-needed)
4-
5-
[![NPM](https://nodei.co/npm/scroll-into-view-if-needed.png?downloadRank=true)](https://www.npmjs.com/package/scroll-into-view-if-needed)
6-
[![NPM](https://nodei.co/npm-dl/scroll-into-view-if-needed.png?months=3&height=2)](https://nodei.co/npm/scroll-into-view-if-needed/)
1+
# scroll-into-view-if-needed · [![CircleCI Status](https://img.shields.io/circleci/project/github/stipsan/scroll-into-view-if-needed.svg?style=flat-square)](https://circleci.com/gh/stipsan/scroll-into-view-if-needed) [![npm version](https://img.shields.io/npm/v/scroll-into-view-if-needed.svg?style=flat-square)](https://www.npmjs.com/package/scroll-into-view-if-needed) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
72

83
This is a [ponyfill](https://ponyfill.com) with the added ability of animating the scroll itself.
94

@@ -12,7 +7,7 @@ Kudos to [@hsablonniere](https://github.com/hsablonniere) for sharing the [origi
127
## Install
138

149
```bash
15-
npm install scroll-into-view-if-needed
10+
yarn add scroll-into-view-if-needed
1611
```
1712

1813
## API
@@ -65,15 +60,15 @@ export default class Homepage extends Component {
6560

6661
constructor(props) {
6762
super(props)
68-
63+
6964
this.setSignupNode = (node) => {
7065
if(node) {
7166
this._signupNode = node
7267
}
7368
}
7469
this.goToSignup = (event) => {
7570
event.preventDefault()
76-
71+
7772
// Passing the dom node from react is all you need for this to work
7873
scrollIntoViewIfNeeded(this._signupNode, false, {
7974
duration: 150

0 commit comments

Comments
 (0)