Skip to content

Commit fcb4406

Browse files
committed
update README
1 parent bbc0d77 commit fcb4406

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

README.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,29 @@ class App extends React.Component {
3939

4040
render() {
4141
return (
42-
<div>
43-
...
44-
<ReactScrollDetector
45-
debounceTime={500}
46-
accuracy={90}
47-
onScrollBottom={this.handleScrollBottom}
48-
onScrollTop={this.handleScrollTop}
49-
>
50-
<div style={{ minHeight: '500px', maxHeight: '500px', overflow: 'auto' }}>
51-
...
52-
</div>
53-
</ReactScrollDetector>
54-
</div>
55-
);
42+
<ReactScrollDetector
43+
debounceTime={500}
44+
accuracy={90}
45+
onScrollBottom={this.handleScrollBottom}
46+
onScrollTop={this.handleScrollTop}
47+
>
48+
<div style={{ minHeight: '500px', maxHeight: '500px', overflow: 'auto' }}>
49+
...
50+
</div>
51+
</ReactScrollDetector>
52+
)
5653
}
5754
}
5855
```
5956

6057
## API
6158

62-
| Prop | Type | Description | Default |
63-
| --- | --- | --- | --- |
64-
| onScrollBottom | Function | Triggers when scroll reaches bottom | () => {} |
65-
| onScrollTop | Function | Triggers when scroll reaches top | () => {} |
66-
| accuracy | Number | Accuracy of detection | 90 |
67-
| debounceTime | Number | D etection debounce time in milli seconds | 500 |
59+
| Prop | Type | Description | Default |
60+
| --- | --- | --- | --- |
61+
| onScrollBottom | Function | Triggers when scroll reaches bottom | (top) => {} |
62+
| onScrollTop | Function | Triggers when scroll reaches top | (top) => {} |
63+
| accuracy | Number | Accuracy of detection | 90 |
64+
| debounceTime | Number | D etection debounce time in milli seconds | 500 |
6865

6966

7067
## License

0 commit comments

Comments
 (0)