From 628634bd09097f85df7c9349b5d9934d7602dd24 Mon Sep 17 00:00:00 2001 From: Alice Dahan Date: Fri, 31 Jan 2025 18:32:55 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20permet=20de=20r=C3=A9initialiser=20un?= =?UTF-8?q?=20radio=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/conversation/ChoicesInput.tsx | 46 +++++++++++-------- .../components/conversation/RuleInput.tsx | 2 +- .../design-system/field/Radio/RadioGroup.tsx | 7 +++ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/site/source/components/conversation/ChoicesInput.tsx b/site/source/components/conversation/ChoicesInput.tsx index 1351bd16a..cd99493a3 100644 --- a/site/source/components/conversation/ChoicesInput.tsx +++ b/site/source/components/conversation/ChoicesInput.tsx @@ -51,11 +51,13 @@ export type Choice = ASTNode<'rule'> & { } export function MultipleAnswerInput({ - choice, + choices, type = 'radio', + autoFocus, + title, ...props }: { - choice: Choice + choices: Choice type?: 'radio' | 'card' | 'toggle' | 'select' } & InputProps) { const { t } = useTranslation() @@ -68,14 +70,14 @@ export function MultipleAnswerInput({ return (