summaryrefslogtreecommitdiff
path: root/app/client/common/paramGroup.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/common/paramGroup.component.js')
-rw-r--r--app/client/common/paramGroup.component.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/app/client/common/paramGroup.component.js b/app/client/common/paramGroup.component.js
index 2533642..6dd45f6 100644
--- a/app/client/common/paramGroup.component.js
+++ b/app/client/common/paramGroup.component.js
@@ -14,20 +14,22 @@ class ParamGroup extends Component {
this.props.actions.set_param(this.props.name, new_value)
}
render() {
- const props = this.props
const checked = this.props.opt[this.props.name]
- const className = checked ? 'paramGroup active' : 'paramGroup inactive'
+ const toggle = !this.props.noToggle
+ const className = (!toggle || checked) ? 'paramGroup active' : 'paramGroup inactive'
return (
<div className={className}>
<label>
- <h3>{props.title}</h3>
- <input
- type='checkbox'
- onClick={this.handleClick}
- checked={checked}
- />
+ <h3>{this.props.title}</h3>
+ {toggle ?
+ <input
+ type='checkbox'
+ onClick={this.handleClick}
+ checked={checked}
+ />
+ : null}
</label>
- {props.children}
+ {this.props.children}
</div>
)
}