From c0af4e2197ce649dabcb2f869a34dcfa871a90eb Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Wed, 29 Mar 2017 16:55:36 +0200 Subject: [PATCH] Use square button for ScrollTop plugin (#1657) - Now scrollTop button has the "square-button"class by default. The class can be changed via configuration. --- web/client/plugins/ScrollTop.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/client/plugins/ScrollTop.jsx b/web/client/plugins/ScrollTop.jsx index c16867cb04..a7c45d9c9d 100644 --- a/web/client/plugins/ScrollTop.jsx +++ b/web/client/plugins/ScrollTop.jsx @@ -12,8 +12,9 @@ const {Glyphicon, Button, OverlayTrigger, Tooltip} = require('react-bootstrap'); /** * ScrollUp Plugin. Show a button that allows to scroll to the top of the page. Only for full pages. - * @prop style {object} the style of the scrollUp div - * @prop showUnder {number} pixels of scroll before to show the button + * @prop cfg.style {object} the style of the scrollUp div + * @prop cfg.btnClassName {string} the class to set for the button + * @prop cfg.showUnder {number} pixels of scroll before to show the button. Default 200 * @memberof plugins * @class * @static @@ -21,11 +22,13 @@ const {Glyphicon, Button, OverlayTrigger, Tooltip} = require('react-bootstrap'); const ScrollTop = React.createClass({ propTypes: { style: React.PropTypes.object, - showUnder: React.PropTypes.number + showUnder: React.PropTypes.number, + btnClassName: React.PropTypes.string }, getDefaultProps() { return { showUnder: 200, + btnClassName: 'square-button', style: { zIndex: 10, position: 'fixed', @@ -42,7 +45,7 @@ const ScrollTop = React.createClass({ return ( }> - + ); }