Skip to content

Commit 32f3b35

Browse files
committed
refactor(bem): replace Block with cn() in Labels.jsx
Migrated Labels tag component from Block to cn() helper. - Replaced Block import with cn import - Replaced <Block name="labels"> with <div className={cn("labels")...}> - No Elems in this file (simple wrapper for Label children) - Preserved mods and Tree.renderChildren call - No behavior change, equivalent class strings
1 parent 3dddc76 commit 32f3b35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/libs/editor/src/tags/control/Labels/Labels.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AnnotationMixin } from "../../../mixins/AnnotationMixin";
1111
import DynamicChildrenMixin from "../../../mixins/DynamicChildrenMixin";
1212
import LabelMixin from "../../../mixins/LabelMixin";
1313
import SelectedModelMixin from "../../../mixins/SelectedModel";
14-
import { Block } from "../../../utils/bem";
14+
import { cn } from "../../../utils/bem";
1515
import ControlBase from "../Base";
1616
import "../Label";
1717
import "./Labels.scss";
@@ -146,9 +146,9 @@ const LabelsModel = types.compose(
146146

147147
const HtxLabels = observer(({ item }) => {
148148
return (
149-
<Block name="labels" mod={{ hidden: !item.visible, inline: item.showinline }}>
149+
<div className={cn("labels").mod({ hidden: !item.visible, inline: item.showinline }).toClassName()}>
150150
{Tree.renderChildren(item, item.annotation)}
151-
</Block>
151+
</div>
152152
);
153153
});
154154

0 commit comments

Comments
 (0)