diff options
| author | Ernst Widerberg <ernst@sunet.se> | 2021-11-05 11:55:47 +0100 |
|---|---|---|
| committer | Ernst Widerberg <ernst@sunet.se> | 2021-11-05 11:55:47 +0100 |
| commit | ac9ba13ffb32472f58e7b68ef968c3578bc090fd (patch) | |
| tree | ed1f72f5eaf81d7c213f982f264d6787edfd5a4c | |
| parent | 993b9c4b4ecb6babeaa52145477378e392620dff (diff) | |
SearchForm: Move IconButton styling to global theme
| -rw-r--r-- | src/components/SearchForm.js | 10 | ||||
| -rw-r--r-- | src/index.js | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/components/SearchForm.js b/src/components/SearchForm.js index 8b55e18..8c502a1 100644 --- a/src/components/SearchForm.js +++ b/src/components/SearchForm.js @@ -59,14 +59,8 @@ class SearchForm extends React.Component { InputProps={{ endAdornment: ( <InputAdornment position="end"> - {this.state.value !== "" && ( - <IconButton - onClick={this.clearSearch} - sx={{ - backgroundColor: - "inherit !important" - }} - > + {this.state.searchValue !== "" && ( + <IconButton onClick={this.clearSearch}> <ClearIcon /> </IconButton> )} diff --git a/src/index.js b/src/index.js index b866e49..774086d 100644 --- a/src/index.js +++ b/src/index.js @@ -14,6 +14,13 @@ let global = createTheme({ disableElevation: true } }, + MuiIconButton: { + styleOverrides: { + root: { + backgroundColor: "inherit !important" + } + } + }, MuiCssBaseline: { styleOverrides: { "*, *::before, *::after": { |
