From d66506b39a5c561ea0ca62bc02e2660ae6ae93f9 Mon Sep 17 00:00:00 2001 From: mortezaei Date: Tue, 25 Aug 2026 14:33:32 +0330 Subject: [PATCH] fix(ui): make 4-option radio questions render vertically with radio indicators --- src/components/Componentes/question-checkbox.tsx | 5 +++-- src/components/Componentes/question-radio.tsx | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/Componentes/question-checkbox.tsx b/src/components/Componentes/question-checkbox.tsx index 6c2c59d..59c4224 100644 --- a/src/components/Componentes/question-checkbox.tsx +++ b/src/components/Componentes/question-checkbox.tsx @@ -113,9 +113,10 @@ export function QuestionCheckbox({ ); }; + // Render horizontally only for 2-option binary choices const isShortOptions = - options.length <= 4 && - options.every((opt) => String(opt.label || opt.value || "").length <= 15); + options.length <= 2 && + options.every((opt) => String(opt.label || opt.value || "").length <= 10); return (
String(opt.label || opt.value || "").length <= 15); + options.length <= 2 && + options.every((opt) => String(opt.label || opt.value || "").length <= 10); return (