File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,11 @@ describe("Input", () => {
114114
115115 it ( "can display help for a checkbox" , async ( ) => {
116116 const help = "Save me!" ;
117- render ( < Input help = { help } type = "checkbox" /> ) ;
117+ const { container } = render ( < Input help = { help } type = "checkbox" /> ) ;
118118 expect ( screen . getByRole ( "checkbox" ) ) . toHaveAccessibleDescription ( help ) ;
119+ expect ( container . querySelector ( ".p-form-help-text" ) ) . not . toHaveClass (
120+ "undefined" ,
121+ ) ;
119122 } ) ;
120123
121124 it ( "can add additional classes" , ( ) => {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export type Props = PropsWithSpread<
3232 /**
3333 * Optional class(es) to pass to the help text element.
3434 */
35- helpClassName ?: ReactNode ;
35+ helpClassName ?: string ;
3636 /**
3737 * The id of the input.
3838 */
@@ -160,7 +160,7 @@ const Input = ({
160160 error = { error }
161161 forId = { inputId }
162162 help = { help }
163- helpClassName = { helpClassName + "" }
163+ helpClassName = { helpClassName }
164164 helpId = { helpId }
165165 isTickElement = { type === "checkbox" || type === "radio" }
166166 label = { fieldLabel }
You can’t perform that action at this time.
0 commit comments