|
|
@ -22,10 +22,10 @@ export function QuestionRadio({ |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Render horizontally if all options are short (e.g. Single, Divorced, Widowed)
|
|
|
|
|
|
|
|
|
// Render horizontally only for 2-option binary choices (e.g. Yes/No, Male/Female)
|
|
|
const isShortOptions = |
|
|
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 ( |
|
|
return ( |
|
|
<div |
|
|
<div |
|
|
|