Less opacity for default values #73

This commit is contained in:
Lukas Martinelli 2017-01-15 17:10:38 +01:00
parent 16bedcf5b1
commit 8f6006c19f
2 changed files with 9 additions and 6 deletions

View file

@ -132,7 +132,6 @@ export default class ZoomSpecProperty extends React.Component {
if(this.props.fieldSpec['zoom-function']) {
zoomBtn = <MakeZoomFunctionButton onClick={this.makeZoomFunction.bind(this)} />
}
return <InputBlock
doc={this.props.fieldSpec.doc}
label={labelFromFieldName(this.props.fieldName)}
@ -143,11 +142,10 @@ export default class ZoomSpecProperty extends React.Component {
}
render() {
if(isZoomField(this.props.value)) {
return this.renderZoomProperty();
} else {
return this.renderProperty();
}
const propClass = this.props.fieldSpec.default === this.props.value ? "maputnik-default-property" : "maputnik-modified-property"
return <div className={propClass}>
{isZoomField(this.props.value) ? this.renderZoomProperty() : this.renderProperty()}
</div>
}
}

View file

@ -129,3 +129,8 @@
background-color: $color-gray;
}
}
// PROPERTY
.maputnik-default-property {
opacity: 0.4;
}