Show search tips for MyAnimeList

This commit is contained in:
schroda
2024-05-07 14:42:02 +02:00
parent f994d32e91
commit f2be29ea3a
4 changed files with 46 additions and 3 deletions

View File

@@ -13,8 +13,10 @@ import CancelIcon from '@mui/icons-material/Cancel';
export const SearchTextField = ({ onCancel, ...textFieldProps }: TextFieldProps & { onCancel: () => void }) => (
<TextField
{...textFieldProps}
InputProps={{
endAdornment: (
...textFieldProps.InputProps,
endAdornment: textFieldProps.InputProps?.endAdornment ?? (
<InputAdornment position="end">
<IconButton onClick={() => onCancel()}>
<CancelIcon />
@@ -22,6 +24,5 @@ export const SearchTextField = ({ onCancel, ...textFieldProps }: TextFieldProps
</InputAdornment>
),
}}
{...textFieldProps}
/>
);