diff --git a/src/Input.tsx b/src/Input.tsx index 4aa21bebb..22622f02a 100644 --- a/src/Input.tsx +++ b/src/Input.tsx @@ -101,6 +101,7 @@ export const Input = memo( })(); const messageId = `${inputId}-desc-error`; + const messagesGroupId = `${inputId}-messages-group`; return (
{ - switch (state) { - case "error": - return "fr-error-text"; - case "success": - return "fr-valid-text"; - case "info": - return "fr-info-text"; - } - assert>(); - })() - ), - classes.message - )} - > - {stateRelatedMessage} -

- )} +
+ {state !== "default" && ( +

{ + switch (state) { + case "error": + return "fr-error-text"; + case "success": + return "fr-valid-text"; + case "info": + return "fr-info-text"; + } + assert>(); + })() + ), + classes.message + )} + > + {stateRelatedMessage} +

+ )} +
); })