summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2021-10-22 17:01:32 +0200
committerErnst Widerberg <ernst@sunet.se>2021-10-22 17:04:05 +0200
commit59e4a9861f231e73364da49d1609a858b4fa307e (patch)
treef9e39302593dc6fc0a20c050ee8fd5420a06966f /src/components
parentee9a0530d44ccfd572ef9ddf398e9b6a3476400e (diff)
Clear search button: Remove background, hide on empty
Diffstat (limited to 'src/components')
-rw-r--r--src/components/SearchForm.js14
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>
)
}}