Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to set className to rendered span #34

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/waypoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Waypoint = React.createClass({
// threshold is percentage of the height of the visible part of the
// scrollable ancestor (e.g. 0.1)
threshold: PropTypes.number,
className: PropTypes.string
},

/**
Expand All @@ -29,6 +30,7 @@ const Waypoint = React.createClass({
threshold: 0,
onEnter() {},
onLeave() {},
className: null
};
},

Expand Down Expand Up @@ -186,7 +188,7 @@ const Waypoint = React.createClass({
render() {
// We need an element that we can locate in the DOM to determine where it is
// rendered relative to the top of its context.
return <span style={{fontSize: 0}} />;
return <span style={{fontSize: 0, className}} />;
}
});

Expand Down