Skip to content

Commit 9f8f4b0

Browse files
committed
fix: adjust duplicate search icon, adjust icon positioning
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
1 parent 0dd6a00 commit 9f8f4b0

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

src/components/mui/search-input.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,12 @@ const SearchInput = ({ term, onSearch, placeholder = "Search...", debounced }) =
6161
<SearchIcon sx={{ color: "#0000008F" }} />
6262
</InputAdornment>
6363
),
64-
endAdornment: term ? (
65-
<IconButton
66-
size="small"
67-
onClick={handleClear}
68-
sx={{ position: "absolute", right: 0 }}
69-
>
70-
<ClearIcon sx={{ color: "#0000008F" }} />
71-
</IconButton>
72-
) : (
73-
<SearchIcon
74-
sx={{ mr: 1, color: "#0000008F", position: "absolute", right: 0 }}
75-
/>
64+
endAdornment: term && (
65+
<InputAdornment position="end">
66+
<IconButton size="small" onClick={handleClear}>
67+
<ClearIcon fontSize="small" sx={{ color: "#0000008F" }} />
68+
</IconButton>
69+
</InputAdornment>
7670
)
7771
}
7872
}}

0 commit comments

Comments
 (0)