@@ -84,29 +84,29 @@ export type Props = React.ComponentPropsWithRef<typeof TextInput> & {
8484 clearAccessibilityLabel ?: string ;
8585 /**
8686 * @supported Available in v5.x with theme version 3
87- * Icon name for the right trailering icon button.
87+ * Icon name for the right trailing icon button.
8888 * Works only when `mode` is set to "bar". It won't be displayed if `loading` is set to `true`.
8989 */
90- traileringIcon ?: IconSource ;
90+ trailingIcon ?: IconSource ;
9191 /**
9292 * @supported Available in v5.x with theme version 3
93- * Custom color for the right trailering icon, default will be derived from theme
93+ * Custom color for the right trailing icon, default will be derived from theme
9494 */
95- traileringIconColor ?: string ;
95+ trailingIconColor ?: string ;
9696 /**
9797 * @supported Available in v5.x with theme version 3
98- * Color of the trailering icon ripple effect.
98+ * Color of the trailing icon ripple effect.
9999 */
100- traileringRippleColor ?: ColorValue ;
100+ trailingRippleColor ?: ColorValue ;
101101 /**
102102 * @supported Available in v5.x with theme version 3
103- * Callback to execute on the right trailering icon button press.
103+ * Callback to execute on the right trailing icon button press.
104104 */
105- onTraileringIconPress ?: ( e : GestureResponderEvent ) => void ;
105+ ontrailingIconPress ?: ( e : GestureResponderEvent ) => void ;
106106 /**
107- * Accessibility label for the right trailering icon button. This is read by the screen reader when the user taps the button.
107+ * Accessibility label for the right trailing icon button. This is read by the screen reader when the user taps the button.
108108 */
109- traileringIconAccessibilityLabel ?: string ;
109+ trailingIconAccessibilityLabel ?: string ;
110110 /**
111111 * @supported Available in v5.x with theme version 3
112112 * Callback which returns a React element to display on the right side.
@@ -187,11 +187,11 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
187187 clearIcon,
188188 clearAccessibilityLabel = 'clear' ,
189189 onClearIconPress,
190- traileringIcon ,
191- traileringIconColor ,
192- traileringIconAccessibilityLabel ,
193- traileringRippleColor : customTraileringRippleColor ,
194- onTraileringIconPress ,
190+ trailingIcon ,
191+ trailingIconColor ,
192+ trailingIconAccessibilityLabel ,
193+ trailingRippleColor : customtrailingRippleColor ,
194+ ontrailingIconPress ,
195195 right,
196196 mode = 'bar' ,
197197 showDivider = true ,
@@ -243,8 +243,8 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
243243 const iconColor = customIconColor || onSurfaceVariant ;
244244 const rippleColor =
245245 customRippleColor || color ( onSurfaceVariant ) . alpha ( 0.32 ) . rgb ( ) . string ( ) ;
246- const traileringRippleColor =
247- customTraileringRippleColor ||
246+ const trailingRippleColor =
247+ customtrailingRippleColor ||
248248 color ( onSurfaceVariant ) . alpha ( 0.32 ) . rgb ( ) . string ( ) ;
249249
250250 const font = {
@@ -256,11 +256,8 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
256256 } ;
257257
258258 const isBarMode = mode === 'bar' ;
259- const shouldRenderTraileringIcon =
260- isBarMode &&
261- traileringIcon &&
262- ! loading &&
263- ( ! value || right !== undefined ) ;
259+ const shouldRendertrailingIcon =
260+ isBarMode && trailingIcon && ! loading && ( ! value || right !== undefined ) ;
264261
265262 return (
266263 < Surface
@@ -362,16 +359,16 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
362359 />
363360 </ View >
364361 ) }
365- { shouldRenderTraileringIcon ? (
362+ { shouldRendertrailingIcon ? (
366363 < IconButton
367364 accessibilityRole = "button"
368365 borderless
369- onPress = { onTraileringIconPress }
370- iconColor = { traileringIconColor || onSurfaceVariant }
371- rippleColor = { traileringRippleColor }
372- icon = { traileringIcon }
373- accessibilityLabel = { traileringIconAccessibilityLabel }
374- testID = { `${ testID } -trailering -icon` }
366+ onPress = { ontrailingIconPress }
367+ iconColor = { trailingIconColor || onSurfaceVariant }
368+ rippleColor = { trailingRippleColor }
369+ icon = { trailingIcon }
370+ accessibilityLabel = { trailingIconAccessibilityLabel }
371+ testID = { `${ testID } -trailing -icon` }
375372 />
376373 ) : null }
377374 { isBarMode &&
0 commit comments