File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export type InputProps = {
1111 className ?: string ;
1212 label : ReactNode ;
1313 hintText ?: ReactNode ;
14+ hideLabel ?: boolean ;
1415 /** default: false */
1516 disabled ?: boolean ;
1617 iconId ?: FrIconClassName | RiIconClassName ;
@@ -58,6 +59,7 @@ export const Input = memo(
5859 className,
5960 label,
6061 hintText,
62+ hideLabel,
6163 disabled = false ,
6264 iconId : iconId_props ,
6365 classes = { } ,
@@ -109,9 +111,8 @@ export const Input = memo(
109111 { ...rest }
110112 >
111113 < label
112- className = { cx ( fr . cx ( "fr-label" ) , classes . label ) }
114+ className = { cx ( fr . cx ( "fr-label" , hideLabel && "fr-sr-only" ) , classes . label ) }
113115 htmlFor = { inputId }
114- aria-describedby = "select-valid-desc-valid"
115116 >
116117 { label }
117118 { hintText !== undefined && < span className = "fr-hint-text" > { hintText } </ span > }
You can’t perform that action at this time.
0 commit comments