diff options
author | Ernst Widerberg <ernst@sunet.se> | 2021-10-22 17:01:32 +0200 |
---|---|---|
committer | Ernst Widerberg <ernst@sunet.se> | 2021-10-22 17:04:05 +0200 |
commit | 59e4a9861f231e73364da49d1609a858b4fa307e (patch) | |
tree | f9e39302593dc6fc0a20c050ee8fd5420a06966f /src/components | |
parent | ee9a0530d44ccfd572ef9ddf398e9b6a3476400e (diff) |
Clear search button: Remove background, hide on empty
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/SearchForm.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/components/SearchForm.js b/src/components/SearchForm.js index 1150dec..a96c351 100644 --- a/src/components/SearchForm.js +++ b/src/components/SearchForm.js @@ -58,9 +58,17 @@ class SearchForm extends React.Component { InputProps={{ endAdornment: ( <InputAdornment position="end"> - <IconButton onClick={this.clearSearch}> - {this.state.value !== "" && <ClearIcon />} - </IconButton> + {this.state.value !== "" && ( + <IconButton + onClick={this.clearSearch} + sx={{ + backgroundColor: + "inherit !important" + }} + > + <ClearIcon /> + </IconButton> + )} </InputAdornment> ) }} |