From b929b6ab02f484de4b2e067b7fdd08a2fef753dd Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Mon, 20 Oct 2025 16:42:24 +0200 Subject: [PATCH 1/6] Add the missing support of help texts to `InputGroup` (#663) `InputGroup` now supports the `helpTexts` prop. For `FileInputField`, `Select`, and `TextField`, help text is not rendered within the `InputGroup` context. The `helpTexts` prop of `InputGroup` must be used instead. --- src/components/Button/README.md | 2 +- .../FileInputField/FileInputField.jsx | 10 ++- src/components/InputGroup/InputGroup.jsx | 20 +++++ .../InputGroup/InputGroup.module.scss | 3 +- src/components/InputGroup/README.md | 83 +++++++++++++++---- .../InputGroup/__tests__/InputGroup.spec.tsx | 4 +- src/components/SelectField/SelectField.jsx | 5 +- src/components/TextField/TextField.jsx | 5 +- 8 files changed, 111 insertions(+), 21 deletions(-) diff --git a/src/components/Button/README.md b/src/components/Button/README.md index be732e6a7..838659b30 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -28,7 +28,7 @@ See [API](#api) for all available options. - **Don't overwhelm your UI** with too many high-emphasis actions. There should always be one but chances are that having more of them is not necessary. -- Ensure the **button action is well recognazible** across your target audience. +- Ensure the **button action is well recognizable** across your target audience. This is especially important when using the button [with an icon only](#icon-buttons). ## Priorities diff --git a/src/components/FileInputField/FileInputField.jsx b/src/components/FileInputField/FileInputField.jsx index 3d718308b..ee58187fb 100644 --- a/src/components/FileInputField/FileInputField.jsx +++ b/src/components/FileInputField/FileInputField.jsx @@ -223,7 +223,7 @@ export const FileInputField = React.forwardRef((props, ref) => { - {helpText && ( + {(helpText && !inputGroupContext) && (
{ {helpText}
)} - {validationText && ( + {(validationText && !inputGroupContext) && (
+ {helpTexts && ( + + )} {validationTexts && (