Make "Functions" toggle have a toggled state
parent
19897ae4f9
commit
76766bd93b
|
@ -47,6 +47,7 @@ const FieldListItem = React.createClass({
|
|||
|
||||
render() {
|
||||
const {isKapacitorRule, fieldFunc, isSelected} = this.props
|
||||
const {isOpen} = this.state
|
||||
const {field: fieldText} = fieldFunc
|
||||
const items = INFLUXQL_FUNCTIONS.map(text => {
|
||||
return {text}
|
||||
|
@ -88,13 +89,13 @@ const FieldListItem = React.createClass({
|
|||
{fieldText}
|
||||
</span>
|
||||
{isSelected
|
||||
? <div className="btn btn-xs btn-info" onClick={this.toggleFunctionsMenu}>
|
||||
? <div className={classNames('btn btn-xs btn-info', {'function-selector--toggled': isOpen})} onClick={this.toggleFunctionsMenu}>
|
||||
Functions
|
||||
</div>
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
{this.state.isOpen
|
||||
{(isSelected && isOpen)
|
||||
? <FunctionSelector
|
||||
onApply={this.handleApplyFunctions}
|
||||
selectedItems={fieldFunc.funcs || []}
|
||||
|
|
|
@ -62,4 +62,11 @@ $function-selector--text-active: $g20-white;
|
|||
background-color: $function-selector--item-active;
|
||||
color: $function-selector--text-active;
|
||||
}
|
||||
}
|
||||
|
||||
.btn.function-selector--toggled {
|
||||
&, &:hover, &:active, &:hover:active {
|
||||
background-color: $g7-graphite !important;
|
||||
color: $g20-white !important;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue