From cd164049b745b1bc897680aff5d964ebb19f3dae Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 23 Nov 2025 13:12:42 +0200 Subject: [PATCH] refactor(react/promoted_attributes): use simplified class name handling --- apps/client/src/widgets/PromotedAttributes.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/PromotedAttributes.tsx b/apps/client/src/widgets/PromotedAttributes.tsx index 54ed808a2..ff555ca84 100644 --- a/apps/client/src/widgets/PromotedAttributes.tsx +++ b/apps/client/src/widgets/PromotedAttributes.tsx @@ -115,12 +115,15 @@ function PromotedAttributeCell(props: CellProps) { }, [ props.shouldFocus ]); let correspondingInput: ComponentChild; + let className: string | undefined; switch (valueAttr.type) { case "label": correspondingInput = ; + className = `promoted-attribute-label-${definition.labelType}`; break; case "relation": correspondingInput = ; + className = "promoted-attribute-relation"; break; default: ws.logError(t(`promoted_attributes.unknown_attribute_type`, { type: valueAttr.type })); @@ -128,8 +131,7 @@ function PromotedAttributeCell(props: CellProps) { } return ( -
+
{definition.labelType !== "boolean" && } {correspondingInput}