From b6b515230fccfdb4945f272d5b8bafea8fb5ed0f Mon Sep 17 00:00:00 2001 From: Andrej Badin Date: Wed, 18 Nov 2015 01:10:26 +0100 Subject: [PATCH] Patch for updated Gemini dependency. This patch adds ability to pass `forceGemini` prop to internal Gemini instance. --- README.md | 5 +++-- dist/index.js | 7 +++++-- src/index.jsx | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b5d80b1..c6214e6 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,8 @@ var GeminiScrollbar = require('react-gemini-scrollbar'); ``` ## Props -* `autoshow`: show scrollbars upon hovering +* `autoshow`: show scrollbars upon hovering +* `forceGemini`: add option to force Gemini scrollbars even if native overlay-scrollbars are available ## Customization @@ -90,4 +91,4 @@ alternative is to pass a `className` to the component. Then you can use that MIT © [Noel Delgado][0] [0]: http://pixelia.me/ -[1]: https://github.com/noeldelgado/gemini-scrollbar \ No newline at end of file +[1]: https://github.com/noeldelgado/gemini-scrollbar diff --git a/dist/index.js b/dist/index.js index 1861138..858471c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12,12 +12,14 @@ module.exports = React.createClass({ displayName: 'GeminiScrollbar', propTypes: { - autoshow: React.PropTypes.bool + autoshow: React.PropTypes.bool, + forceGemini: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { - autoshow: false + autoshow: false, + forceGemini: false }; }, @@ -31,6 +33,7 @@ module.exports = React.createClass({ this.scrollbar = new GeminiScrollbar({ element: ReactDOM.findDOMNode(this), autoshow: this.props.autoshow, + forceGemini: this.props.forceGemini, createElements: false }).create(); }, diff --git a/src/index.jsx b/src/index.jsx index a72490e..56581be 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -6,12 +6,14 @@ module.exports = React.createClass({ displayName: 'GeminiScrollbar', propTypes: { - autoshow: React.PropTypes.bool + autoshow: React.PropTypes.bool, + forceGemini: React.PropTypes.bool }, getDefaultProps() { return { - autoshow: false + autoshow: false, + forceGemini: false } }, @@ -25,6 +27,7 @@ module.exports = React.createClass({ this.scrollbar = new GeminiScrollbar({ element: ReactDOM.findDOMNode(this), autoshow: this.props.autoshow, + forceGemini: this.props.forceGemini, createElements: false }).create(); },