Skip to content

Commit 5073d01

Browse files
authored
Merge pull request #82 from TheBearSO/master
Add support to className
2 parents 9069e0c + 2524351 commit 5073d01

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ name | type | description
7171
**scrollThreshold** | number | string | A threshold value defining when `InfiniteScroll` will call `next`. Default value is `0.8`. It means the `next` will be called when user comes below 80% of the total height. If you pass threshold in pixels (`scrollThreshold="200px"`), `next` will be called once you scroll at least (100% - scrollThreshold) pixels down.
7272
**onScroll** | function | a function that will listen to the scroll event on the scrolling container. Note that the scroll event is throttled, so you may not receive as many events as you would expect.
7373
**endMessage** | node | this message is shown to the user when he has seen all the records which means he's at the bottom and `hasMore` is `false`
74+
**className** | string | add any custom class you want
7475
**style** | object | any style which you want to override
7576
**height** | number | optional, give only if you want to have a fixed height scrolling content
7677
**scrollableTarget** | node or string | optional, reference to a (parent) DOM element that is already providing overflow scrollbars to the `InfiniteScroll` component. *You should provide the `id` of the DOM node preferably.*

app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default class InfiniteScroll extends Component {
223223
return (
224224
<div style={outerDivStyle}>
225225
<div
226-
className="infinite-scroll-component"
226+
className={`infinite-scroll-component ${this.props.className || ''}`}
227227
ref={infScroll => (this._infScroll = infScroll)}
228228
style={style}
229229
>

0 commit comments

Comments
 (0)