Skip to content

Commit 0a25e02

Browse files
committed
Update README
1 parent 6704972 commit 0a25e02

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
<h1 align="center" style="padding: 40px;">
1+
<h1 align="center">
22
👟 React Scroll-To
33
</h1>
44

5+
<div align="center">
6+
57
[![CircleCI](https://circleci.com/gh/ganderzz/react-scroll-to/tree/master.svg?style=svg)](https://circleci.com/gh/ganderzz/react-scroll-to/tree/master)
68
[![Coverage Status](https://coveralls.io/repos/github/ganderzz/react-scroll-to/badge.svg?branch=feature%2Fcreate-circi-artifact)](https://coveralls.io/github/ganderzz/react-scroll-to?branch=feature%2Fcreate-circi-artifact)
79
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)
810
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
911

12+
</div>
13+
1014
A React component that makes scrolling easy.
1115

1216
React Scroll-To provides a Higher Order Component, and Render Props implementation.
1317

14-
[Visit React Storybook Examples](https://ganderzz.github.io/react-scroll-to/)
18+
**Example:** [View React Storybook Examples](https://ganderzz.github.io/react-scroll-to/)
1519

1620
### Install
1721

@@ -52,7 +56,7 @@ export default class MyComponent extends Component {
5256
<ScrollTo>
5357
{({ scrollTo }) => (
5458
<ScrollArea style={{ height: 1000 }}>
55-
<button onClick={() => scrollTo({ y: 500 })}>
59+
<button onClick={() => scrollTo({ y: 500, smooth: true })}>
5660
Scroll within this container
5761
</button>
5862
</ScrollArea>
@@ -163,6 +167,11 @@ export default ScrollToHOC(function(props) {
163167
});
164168
```
165169
170+
### Types:
171+
172+
* **Typescript** definitions are built in
173+
* **Flow** is currently not support (Open for PRs!)
174+
166175
### 2.0 Changes
167176
168177
* v2.0 has a new API for controlling scrolling. Instead of taking two arguments, x and y, the ScrollTo component now takes an object.
@@ -181,12 +190,6 @@ Mixing and matching these options give different results.
181190
182191
* The `scrollById` function has been deprecated in favor of the `id` field in `scrollTo`
183192
184-
185-
### Examples
186-
187-
* Check out this [demo on CodeSandbox](https://codesandbox.io/s/yqlj0yjr41) to see how to use `<ScrollTo />`.
188-
* Check out this [demo on CodeSandbox](https://codesandbox.io/s/5wm7qolrmp) to see how to use `<ScrollArea />`.
189-
190193
## Contributors
191194
192195
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scroll-to",
3-
"version": "2.0.0-alpha.2",
3+
"version": "2.0.0",
44
"description": "Scroll to a position using react",
55
"main": "./dist/react-scroll-to.js",
66
"types": "./dist/definitions",

0 commit comments

Comments
 (0)