@@ -84,29 +84,29 @@ export type Props = React.ComponentPropsWithRef<typeof TextInput> & {
84
84
clearAccessibilityLabel ?: string ;
85
85
/**
86
86
* @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.
88
88
* Works only when `mode` is set to "bar". It won't be displayed if `loading` is set to `true`.
89
89
*/
90
- traileringIcon ?: IconSource ;
90
+ trailingIcon ?: IconSource ;
91
91
/**
92
92
* @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
94
94
*/
95
- traileringIconColor ?: string ;
95
+ trailingIconColor ?: string ;
96
96
/**
97
97
* @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.
99
99
*/
100
- traileringRippleColor ?: ColorValue ;
100
+ trailingRippleColor ?: ColorValue ;
101
101
/**
102
102
* @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.
104
104
*/
105
- onTraileringIconPress ?: ( e : GestureResponderEvent ) => void ;
105
+ onTrailingIconPress ?: ( e : GestureResponderEvent ) => void ;
106
106
/**
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.
108
108
*/
109
- traileringIconAccessibilityLabel ?: string ;
109
+ trailingIconAccessibilityLabel ?: string ;
110
110
/**
111
111
* @supported Available in v5.x with theme version 3
112
112
* Callback which returns a React element to display on the right side.
@@ -187,11 +187,11 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
187
187
clearIcon,
188
188
clearAccessibilityLabel = 'clear' ,
189
189
onClearIconPress,
190
- traileringIcon ,
191
- traileringIconColor ,
192
- traileringIconAccessibilityLabel ,
193
- traileringRippleColor : customTraileringRippleColor ,
194
- onTraileringIconPress ,
190
+ trailingIcon ,
191
+ trailingIconColor ,
192
+ trailingIconAccessibilityLabel ,
193
+ trailingRippleColor : customTrailingRippleColor ,
194
+ onTrailingIconPress ,
195
195
right,
196
196
mode = 'bar' ,
197
197
showDivider = true ,
@@ -243,8 +243,8 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
243
243
const iconColor = customIconColor || onSurfaceVariant ;
244
244
const rippleColor =
245
245
customRippleColor || color ( onSurfaceVariant ) . alpha ( 0.32 ) . rgb ( ) . string ( ) ;
246
- const traileringRippleColor =
247
- customTraileringRippleColor ||
246
+ const trailingRippleColor =
247
+ customTrailingRippleColor ||
248
248
color ( onSurfaceVariant ) . alpha ( 0.32 ) . rgb ( ) . string ( ) ;
249
249
250
250
const font = {
@@ -256,11 +256,8 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
256
256
} ;
257
257
258
258
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 ) ;
264
261
265
262
return (
266
263
< Surface
@@ -362,16 +359,16 @@ const Searchbar = forwardRef<TextInputHandles, Props>(
362
359
/>
363
360
</ View >
364
361
) }
365
- { shouldRenderTraileringIcon ? (
362
+ { shouldRenderTrailingIcon ? (
366
363
< IconButton
367
364
accessibilityRole = "button"
368
365
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` }
375
372
/>
376
373
) : null }
377
374
{ isBarMode &&
0 commit comments