From 9969d73d485daa8c483ce3fd7ac7cdf24687f8fa Mon Sep 17 00:00:00 2001 From: Petr Brzek Date: Thu, 22 Oct 2015 01:52:41 +0200 Subject: [PATCH] Add possibility to set className to rendered span Sometimes is necessary to style span because of some non trivial page layout (e.g. using flexbox). --- src/waypoint.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/waypoint.jsx b/src/waypoint.jsx index 73b8d1a..3e71172 100644 --- a/src/waypoint.jsx +++ b/src/waypoint.jsx @@ -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 }, /** @@ -29,6 +30,7 @@ const Waypoint = React.createClass({ threshold: 0, onEnter() {}, onLeave() {}, + className: null }; }, @@ -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 ; + return ; } });