summaryrefslogtreecommitdiffstats
path: root/web/react/components/setting_item_min.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-08-31 11:31:55 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-01 18:45:18 -0400
commit7d07bf6a79c9507b2178338464f7d28ce9a9a4ac (patch)
treefce94a47f975e845a913454e768f135df2a0e5ed /web/react/components/setting_item_min.jsx
parent72575ac7bdd5bfe7bd544ba238f8d1c0126635aa (diff)
downloadchat-7d07bf6a79c9507b2178338464f7d28ce9a9a4ac.tar.gz
chat-7d07bf6a79c9507b2178338464f7d28ce9a9a4ac.tar.bz2
chat-7d07bf6a79c9507b2178338464f7d28ce9a9a4ac.zip
Refactored various React components to use ES6 syntax and to match the style guide without any errors or warnings
Diffstat (limited to 'web/react/components/setting_item_min.jsx')
-rw-r--r--web/react/components/setting_item_min.jsx35
1 files changed, 23 insertions, 12 deletions
diff --git a/web/react/components/setting_item_min.jsx b/web/react/components/setting_item_min.jsx
index 3c87e416e..098729a4f 100644
--- a/web/react/components/setting_item_min.jsx
+++ b/web/react/components/setting_item_min.jsx
@@ -1,19 +1,23 @@
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
-module.exports = React.createClass({
- displayName: 'SettingsItemMin',
- propTypes: {
- title: React.PropTypes.string,
- disableOpen: React.PropTypes.bool,
- updateSection: React.PropTypes.func,
- describe: React.PropTypes.string
- },
- render: function() {
- var editButton = '';
+export default class SettingItemMin extends React.Component {
+ render() {
+ let editButton = null;
if (!this.props.disableOpen) {
- editButton = <li className='col-sm-2 section-edit'><a className='section-edit theme' href='#' onClick={this.props.updateSection}>Edit</a></li>;
+ editButton = (
+ <li className='col-sm-2 section-edit'>
+ <a
+ className='section-edit theme'
+ href='#'
+ onClick={this.props.updateSection}
+ >
+ Edit
+ </a>
+ </li>
+ );
}
+
return (
<ul className='section-min'>
<li className='col-sm-10 section-title'>{this.props.title}</li>
@@ -22,4 +26,11 @@ module.exports = React.createClass({
</ul>
);
}
-});
+}
+
+SettingItemMin.propTypes = {
+ title: React.PropTypes.string,
+ disableOpen: React.PropTypes.bool,
+ updateSection: React.PropTypes.func,
+ describe: React.PropTypes.string
+};