From a820b1640bcea06d93fed790b891a853ea02e498 Mon Sep 17 00:00:00 2001 From: enahum Date: Thu, 18 Aug 2016 17:36:43 -0500 Subject: PLT-2345 Switch "help" link below text input box to localizable version (#3794) --- webapp/components/help/help_controller.jsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 webapp/components/help/help_controller.jsx (limited to 'webapp/components/help/help_controller.jsx') 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 ( +
+
+ {this.props.children} +
+
+ ); + } +} \ No newline at end of file -- cgit v1.2.3-1-g7c22