blob: 56a13b7e85b2f94e140d3fe454dcb45b80d8c109 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>
);
}
}
|