@@ -108,13 +108,13 @@ export default class MyComponent extends Component {
108108 <>
109109 < ScrollTo>
110110 {({ scrollTo }) => (
111- < a onClick= {() => scrollTo ({ ref: this .myRef , x: 20 , y: 500 })}> Scroll to Bottom< / a>
111+ < a onClick= {() => scrollTo ({ ref: this .myRef , x: 20 , y: 500 })}>
112+ Scroll to Bottom
113+ < / a>
112114 )}
113115 < / ScrollTo>
114116
115- < div ref= {this .myRef }>
116- My Element
117- < / div>
117+ < div ref= {this .myRef }> My Element < / div>
118118 < / >
119119 );
120120 }
@@ -156,7 +156,9 @@ export default ScrollToHOC(function(props) {
156156 return (
157157 < div>
158158 < ScrollArea id= " foo" style= {{ height: 1000 }}>
159- < a onClick= {() => props .scrollTo ({ id: " foo" , y: 500 })}> Scroll to Bottom< / a>
159+ < a onClick= {() => props .scrollTo ({ id: " foo" , y: 500 })}>
160+ Scroll to Bottom
161+ < / a>
160162 < / ScrollArea>
161163
162164 < ScrollArea style= {{ height: 1000 }}>
@@ -169,12 +171,12 @@ export default ScrollToHOC(function(props) {
169171
170172### Types:
171173
172- * **Typescript** definitions are built in
173- * **Flow** is currently not support (Open for PRs!)
174+ - **Typescript** definitions are built in
175+ - **Flow** is currently not support (Open for PRs!)
174176
175177### 2.0 Changes
176178
177- * v2.0 has a new API for controlling scrolling. Instead of taking two arguments, x and y, the ScrollTo component now takes an object.
179+ - v2.0 has a new API for controlling scrolling. Instead of taking two arguments, x and y, the ScrollTo component now takes an object.
178180
179181```js
180182scrollTo({
@@ -188,7 +190,13 @@ scrollTo({
188190
189191Mixing and matching these options give different results.
190192
191- * The `scrollById` function has been deprecated in favor of the `id` field in `scrollTo`
193+ - The `scrollById` function has been deprecated in favor of the `id` field in `scrollTo`
194+
195+ ### Smooth Scrolling Not Working?
196+
197+ Some browsers don' t natively support smooth scroll . Checkout adding a polyfill like ` smoothscroll-polyfill` to fix the issue.
198+
199+ ` npm install smoothscroll-polyfill`
192200
193201## Contributors
194202
@@ -209,6 +217,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
209217
210218<!-- markdownlint- enable -->
211219<!-- prettier- ignore- end -->
220+
212221<!-- ALL - CONTRIBUTORS - LIST : END -->
213222
214223This project follows the [all- contributors](https: // github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
0 commit comments