2015-10-08 12:27:09 -04:00
|
|
|
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
2015-06-14 23:53:32 -08:00
|
|
|
// See License.txt for license information.
|
|
|
|
|
|
2015-08-31 11:31:55 -04:00
|
|
|
export default class SettingItemMin extends React.Component {
|
|
|
|
|
render() {
|
|
|
|
|
let editButton = null;
|
2015-08-13 08:54:05 -07:00
|
|
|
if (!this.props.disableOpen) {
|
2015-08-31 11:31:55 -04:00
|
|
|
editButton = (
|
|
|
|
|
<li className='col-sm-2 section-edit'>
|
|
|
|
|
<a
|
|
|
|
|
className='section-edit theme'
|
|
|
|
|
href='#'
|
|
|
|
|
onClick={this.props.updateSection}
|
|
|
|
|
>
|
2015-09-09 22:32:21 +05:00
|
|
|
<i className='fa fa-pencil'/>
|
|
|
|
|
{'Edit'}
|
2015-08-31 11:31:55 -04:00
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
);
|
2015-08-13 08:50:40 -07:00
|
|
|
}
|
2015-08-31 11:31:55 -04:00
|
|
|
|
2015-06-14 23:53:32 -08:00
|
|
|
return (
|
2015-09-09 21:26:15 +05:00
|
|
|
<ul
|
|
|
|
|
className='section-min'
|
|
|
|
|
onClick={this.props.updateSection}
|
|
|
|
|
>
|
2015-08-13 08:54:05 -07:00
|
|
|
<li className='col-sm-10 section-title'>{this.props.title}</li>
|
2015-08-13 08:50:40 -07:00
|
|
|
{editButton}
|
2015-08-13 08:54:05 -07:00
|
|
|
<li className='col-sm-7 section-describe'>{this.props.describe}</li>
|
2015-06-14 23:53:32 -08:00
|
|
|
</ul>
|
|
|
|
|
);
|
|
|
|
|
}
|
2015-08-31 11:31:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SettingItemMin.propTypes = {
|
|
|
|
|
title: React.PropTypes.string,
|
|
|
|
|
disableOpen: React.PropTypes.bool,
|
|
|
|
|
updateSection: React.PropTypes.func,
|
|
|
|
|
describe: React.PropTypes.string
|
|
|
|
|
};
|