mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
36 lines
1007 B
JavaScript
36 lines
1007 B
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
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;
|
|
|
|
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>
|
|
);
|
|
}
|
|
}
|