From e263f1a4f70203a2022fefb04f93379953d1b303 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 24 Nov 2026 22:21:34 -0400 Subject: [PATCH] fix: keep leading RadioButton.Item labels beside the control A leading radio sat on the left while the label used textAlign right, so the text jumped to the far edge of the row. --- src/components/RadioButton/RadioButtonItem.tsx | 3 ++- .../RadioButton/__snapshots__/RadioButtonItem.test.tsx.snap | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/RadioButton/RadioButtonItem.tsx b/src/components/RadioButton/RadioButtonItem.tsx index f99def9b96..754905aba1 100644 --- a/src/components/RadioButton/RadioButtonItem.tsx +++ b/src/components/RadioButton/RadioButtonItem.tsx @@ -181,7 +181,8 @@ const RadioButtonItem = ({ radioButton = ; } - const textAlign = isLeading ? 'right' : 'left'; + // Leading puts the control on the left. Keep the label beside it. + const textAlign = 'left'; const computedStyle: TextStyle = { ...getStateLayer(theme, 'onSurface', disabled ? 'disabled' : 'enabled'), diff --git a/src/components/__tests__/RadioButton/__snapshots__/RadioButtonItem.test.tsx.snap b/src/components/__tests__/RadioButton/__snapshots__/RadioButtonItem.test.tsx.snap index 81713f6cb3..2fe6f5cfb6 100644 --- a/src/components/__tests__/RadioButton/__snapshots__/RadioButtonItem.test.tsx.snap +++ b/src/components/__tests__/RadioButton/__snapshots__/RadioButtonItem.test.tsx.snap @@ -112,7 +112,7 @@ exports[`can render leading radio button control 1`] = ` { "color": "rgba(29, 27, 32, 1)", "opacity": 1, - "textAlign": "right", + "textAlign": "left", }, undefined, ],