Dark Mode: Settings Search Bar (#13997)

feature/default_network_editable
David Walsh 3 years ago committed by GitHub
parent 87636bfdf7
commit 3bdfd7f6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ui/pages/settings/settings-search/settings-search.js

@ -15,7 +15,9 @@ export default function SettingsSearch({
const t = useContext(I18nContext); const t = useContext(I18nContext);
const [searchQuery, setSearchQuery] = useState(''); const [searchQuery, setSearchQuery] = useState('');
const [searchIconColor, setSearchIconColor] = useState('#9b9b9b'); const [searchIconColor, setSearchIconColor] = useState(
'var(--color-icon-muted)',
);
const settingsRoutesListArray = Object.values(settingsRoutesList); const settingsRoutesListArray = Object.values(settingsRoutesList);
const settingsSearchFuse = new Fuse(settingsRoutesListArray, { const settingsSearchFuse = new Fuse(settingsRoutesListArray, {
@ -32,9 +34,9 @@ export default function SettingsSearch({
const handleSearch = (searchQuery) => { const handleSearch = (searchQuery) => {
setSearchQuery(searchQuery); setSearchQuery(searchQuery);
if (searchQuery === '') { if (searchQuery === '') {
setSearchIconColor('#9b9b9b'); setSearchIconColor('var(--color-icon-muted)');
} else { } else {
setSearchIconColor('#24292E'); setSearchIconColor('var(--color-icon-default)');
} }
const fuseSearchResult = settingsSearchFuse.search(searchQuery); const fuseSearchResult = settingsSearchFuse.search(searchQuery);
const addressSearchResult = settingsRoutesListArray.filter((routes) => { const addressSearchResult = settingsRoutesListArray.filter((routes) => {
@ -91,7 +93,6 @@ export default function SettingsSearch({
fullWidth fullWidth
autoFocus autoFocus
autoComplete="off" autoComplete="off"
style={{ backgroundColor: '#fff' }}
startAdornment={renderStartAdornment()} startAdornment={renderStartAdornment()}
endAdornment={renderEndAdornment()} endAdornment={renderEndAdornment()}
/> />

Loading…
Cancel
Save