mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
chore(ui): avoid using inject in StaticLabel
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user