chore(ui): avoid using inject in StaticLabel

This commit is contained in:
Łukasz Mierzwa
2019-10-30 13:38:07 +00:00
parent 311a101cda
commit ec836ae63c

View File

@@ -1,27 +1,25 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { observer } from "mobx-react";
import { BaseLabel } from "Components/Labels/BaseLabel";
// Renders a static label element, no click actions, no hover
const StaticLabel = inject("alertStore")(
observer(
class FilteringLabel extends BaseLabel {
render() {
const { name, value } = this.props;
const StaticLabel = observer(
class FilteringLabel extends BaseLabel {
render() {
const { name, value } = this.props;
let cs = this.getClassAndStyle(name, value);
let cs = this.getClassAndStyle(name, value);
return (
<span className={cs.className} style={cs.style}>
<span className="components-label-name">{name}:</span>{" "}
<span className="components-label-value">{value}</span>
</span>
);
}
return (
<span className={cs.className} style={cs.style}>
<span className="components-label-name">{name}:</span>{" "}
<span className="components-label-value">{value}</span>
</span>
);
}
)
}
);
export { StaticLabel };