diff options
Diffstat (limited to 'webapp/components/help/help_controller.jsx')
-rw-r--r-- | webapp/components/help/help_controller.jsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/webapp/components/help/help_controller.jsx b/webapp/components/help/help_controller.jsx new file mode 100644 index 000000000..56a13b7e8 --- /dev/null +++ b/webapp/components/help/help_controller.jsx @@ -0,0 +1,27 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; +import ReactDOM from 'react-dom'; + +export default class HelpController extends React.Component { + static get propTypes() { + return { + children: React.PropTypes.node.isRequired + }; + } + + componentWillUpdate() { + ReactDOM.findDOMNode(this).scrollIntoView(); + } + + render() { + return ( + <div className='help'> + <div className='container col-sm-10 col-sm-offset-1'> + {this.props.children} + </div> + </div> + ); + } +}
\ No newline at end of file |