Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Convert GeminiScrollbarWrapper to stateless component
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebarnard1 committed Mar 27, 2018
1 parent 39e9d52 commit 2ffcad0
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/components/views/elements/GeminiScrollbarWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,19 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import React from 'react';
import GeminiScrollbar from 'react-gemini-scrollbar';

class GeminiScrollbarWrapper extends React.Component {
render() {
// Enable forceGemini so that gemini is always enabled. This is
// to avoid future issues where a feature is implemented without
// doing QA on every OS/browser combination.
//
// By default GeminiScrollbar allows native scrollbars to be used
// on macOS. Use forceGemini to enable Gemini's non-native
// scrollbars on all OSs.
return <GeminiScrollbar ref={this.props.wrappedRef} forceGemini={true} {...this.props}>
{ this.props.children }
</GeminiScrollbar>;
}
function GeminiScrollbarWrapper(props) {
// Enable forceGemini so that gemini is always enabled. This is
// to avoid future issues where a feature is implemented without
// doing QA on every OS/browser combination.
//
// By default GeminiScrollbar allows native scrollbars to be used
// on macOS. Use forceGemini to enable Gemini's non-native
// scrollbars on all OSs.
return <GeminiScrollbar ref={props.wrappedRef} forceGemini={true} {...props}>
{ props.children }
</GeminiScrollbar>;
}

export default GeminiScrollbarWrapper;

0 comments on commit 2ffcad0

Please sign in to comment.