mirror of https://github.com/vector-im/riot-web
Convert GeminiScrollbarWrapper to stateless component
parent
39e9d52c04
commit
2ffcad0981
|
@ -14,11 +14,9 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||||
|
|
||||||
class GeminiScrollbarWrapper extends React.Component {
|
function GeminiScrollbarWrapper(props) {
|
||||||
render() {
|
|
||||||
// Enable forceGemini so that gemini is always enabled. This is
|
// Enable forceGemini so that gemini is always enabled. This is
|
||||||
// to avoid future issues where a feature is implemented without
|
// to avoid future issues where a feature is implemented without
|
||||||
// doing QA on every OS/browser combination.
|
// doing QA on every OS/browser combination.
|
||||||
|
@ -26,11 +24,9 @@ class GeminiScrollbarWrapper extends React.Component {
|
||||||
// By default GeminiScrollbar allows native scrollbars to be used
|
// By default GeminiScrollbar allows native scrollbars to be used
|
||||||
// on macOS. Use forceGemini to enable Gemini's non-native
|
// on macOS. Use forceGemini to enable Gemini's non-native
|
||||||
// scrollbars on all OSs.
|
// scrollbars on all OSs.
|
||||||
return <GeminiScrollbar ref={this.props.wrappedRef} forceGemini={true} {...this.props}>
|
return <GeminiScrollbar ref={props.wrappedRef} forceGemini={true} {...props}>
|
||||||
{ this.props.children }
|
{ props.children }
|
||||||
</GeminiScrollbar>;
|
</GeminiScrollbar>;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default GeminiScrollbarWrapper;
|
export default GeminiScrollbarWrapper;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue