diff --git a/src/components/forms/SearchInput.tsx b/src/components/forms/SearchInput.tsx index 30791d0052..97540d0bca 100644 --- a/src/components/forms/SearchInput.tsx +++ b/src/components/forms/SearchInput.tsx @@ -23,6 +23,7 @@ export const SearchInput = React.forwardRef( function SearchInput({value, label, onClearText, ...rest}, ref) { const t = useTheme() const {_} = useLingui() + const showClear = value && value.length > 0 return ( @@ -41,11 +42,18 @@ export const SearchInput = React.forwardRef( autoCorrect={false} autoComplete="off" autoCapitalize="none" + style={[ + showClear + ? { + paddingRight: 24, + } + : {}, + ]} {...rest} /> - {value && value.length > 0 && ( + {showClear && (