From af5c5ee28450036e6beca96eae73933301f11097 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Sat, 31 Jan 2026 11:08:07 +0100 Subject: [PATCH 1/2] fix(description) - help center links --- .../fields/default/RadioGroupFieldDefault.tsx | 6 +++-- src/components/ui/form.tsx | 25 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/components/form/fields/default/RadioGroupFieldDefault.tsx b/src/components/form/fields/default/RadioGroupFieldDefault.tsx index 70278a5a..aaf34d1d 100644 --- a/src/components/form/fields/default/RadioGroupFieldDefault.tsx +++ b/src/components/form/fields/default/RadioGroupFieldDefault.tsx @@ -25,8 +25,10 @@ export const RadioGroupFieldDefault = ({ {label} {description && ( - - {description} + } + > + {description} )} diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx index 30535455..89c4c437 100644 --- a/src/components/ui/form.tsx +++ b/src/components/ui/form.tsx @@ -131,6 +131,7 @@ const FormControl = React.forwardRef< FormControl.displayName = 'FormControl'; function FormDescription({ + helpCenter, className, children, as, @@ -138,22 +139,25 @@ function FormDescription({ }: React.ComponentProps<'p'> & { children?: React.ReactNode | (() => React.ReactNode); as?: T; + helpCenter?: React.ReactNode; } & Omit, 'children' | 'className'>) { const { formDescriptionId } = useFormField(); const Component = as || 'p'; if (typeof children === 'string') { return ( - + <> + + {' '} + {helpCenter && helpCenter} + + ); } @@ -166,6 +170,7 @@ function FormDescription({ {...props} > {typeof children === 'function' ? children() : children} + {helpCenter && helpCenter} ); } From 74893726f9387eed229b95a9dadd1589586f5728 Mon Sep 17 00:00:00 2001 From: Gabriel Garcia Date: Sat, 31 Jan 2026 11:21:15 +0100 Subject: [PATCH 2/2] fix description --- .../form/fields/tests/CurrencyConversionField.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/form/fields/tests/CurrencyConversionField.test.tsx b/src/components/form/fields/tests/CurrencyConversionField.test.tsx index 703025d0..bcef4bed 100644 --- a/src/components/form/fields/tests/CurrencyConversionField.test.tsx +++ b/src/components/form/fields/tests/CurrencyConversionField.test.tsx @@ -285,7 +285,9 @@ describe('CurrencyFieldWithConversion', () => { const descriptionElement = screen.getByText( /Enter your test salary/i, ).parentElement; - expect(descriptionElement).toHaveClass('CustomPrefix-description'); + expect(descriptionElement?.parentElement).toHaveClass( + 'CustomPrefix-description', + ); }); it('resets conversion field when source currency changes', async () => {