diff options
author | enahum <nahumhbl@gmail.com> | 2017-05-24 09:04:26 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-05-24 09:04:26 -0400 |
commit | 94fb9f62796f8c55745962dd7253b40714f8cac7 (patch) | |
tree | 2979aaf41ad771a10bc6f57ee8327481b586c0a3 /webapp/components/admin_console/setting.jsx | |
parent | cb50fff3b718b9e5f9032884e279d54bf342e86a (diff) | |
download | chat-94fb9f62796f8c55745962dd7253b40714f8cac7.tar.gz chat-94fb9f62796f8c55745962dd7253b40714f8cac7.tar.bz2 chat-94fb9f62796f8c55745962dd7253b40714f8cac7.zip |
PLT-6654 Fix SAML page in System Console (#6480)
Diffstat (limited to 'webapp/components/admin_console/setting.jsx')
-rw-r--r-- | webapp/components/admin_console/setting.jsx | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/webapp/components/admin_console/setting.jsx b/webapp/components/admin_console/setting.jsx index 591e8b551..9ef6554ac 100644 --- a/webapp/components/admin_console/setting.jsx +++ b/webapp/components/admin_console/setting.jsx @@ -1,34 +1,35 @@ -import PropTypes from 'prop-types'; - // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import React from 'react'; +import React, {PureComponent} from 'react'; +import PropTypes from 'prop-types'; + +export default class Settings extends PureComponent { + static propTypes = { + inputId: PropTypes.string, + label: PropTypes.node.isRequired, + children: PropTypes.node.isRequired, + helpText: PropTypes.node + }; + + render() { + const {children, helpText, inputId, label} = this.props; -export default function Setting(props) { - return ( - <div className='form-group'> - <label - className='control-label col-sm-4' - htmlFor={props.inputId} - > - {props.label} - </label> - <div className='col-sm-8'> - {props.children} - <div className='help-text'> - {props.helpText} + return ( + <div className='form-group'> + <label + className='control-label col-sm-4' + htmlFor={inputId} + > + {label} + </label> + <div className='col-sm-8'> + {children} + <div className='help-text'> + {helpText} + </div> </div> </div> - </div> - ); + ); + } } -Setting.defaultProps = { -}; - -Setting.propTypes = { - inputId: PropTypes.string, - label: PropTypes.node.isRequired, - children: PropTypes.node.isRequired, - helpText: PropTypes.node -}; |