@@ -12,7 +12,7 @@ const customTheme = (theme: Theme) =>
1212 MuiTextField : {
1313 styleOverrides : {
1414 root : {
15- '--TextField-brandBorderColor' : 'rgba(0, 0, 0, 0.5)' ,
15+ '--TextField-brandBorderColor' : theme . palette . border . strong ,
1616 '--TextField-brandBorderHoverColor' : theme . palette . background . graphics ?. default ,
1717 '--TextField-brandBorderFocusedColor' : theme . palette . background . graphics ?. default ,
1818 '& label.Mui-focused' : {
@@ -39,6 +39,7 @@ const customTheme = (theme: Theme) =>
3939 MuiInput : {
4040 styleOverrides : {
4141 root : {
42+ color : theme . palette . text . default ,
4243 '&::before' : {
4344 borderBottom : '2px solid var(--TextField-brandBorderColor)'
4445 } ,
@@ -61,21 +62,18 @@ export interface SearchBarProps {
6162 onClear ?: ( ) => void ;
6263 expanded : boolean ;
6364 setExpanded : ( expanded : boolean ) => void ;
64- iconFill ?: string ;
6565}
6666
6767function SearchBar ( {
6868 onSearch,
6969 placeholder,
7070 onClear,
7171 expanded,
72- setExpanded,
73- iconFill
72+ setExpanded
7473} : SearchBarProps ) : JSX . Element {
7574 const [ searchText , setSearchText ] = React . useState ( '' ) ;
7675 const searchRef = React . useRef < HTMLInputElement | null > ( null ) ;
77-
78- const outerTheme = useTheme ( ) ;
76+ const theme = useTheme ( ) ;
7977
8078 const handleSearchChange = ( event : React . ChangeEvent < HTMLInputElement > ) : void => {
8179 setSearchText ( event . target . value ) ;
@@ -123,7 +121,7 @@ function SearchBar({
123121 } }
124122 >
125123 < div >
126- < ThemeProvider theme = { customTheme ( outerTheme ) } >
124+ < ThemeProvider theme = { customTheme ( theme ) } >
127125 < TextField
128126 variant = "standard"
129127 value = { searchText }
@@ -144,14 +142,14 @@ function SearchBar({
144142 < TooltipIcon
145143 title = "Close"
146144 onClick = { handleClearIconClick }
147- icon = { < CloseIcon fill = { iconFill } /> }
145+ icon = { < CloseIcon fill = { theme . palette . icon . default } /> }
148146 arrow
149147 />
150148 ) : (
151149 < TooltipIcon
152150 title = "Search"
153151 onClick = { handleSearchIconClick }
154- icon = { < SearchIcon fill = { iconFill } /> }
152+ icon = { < SearchIcon fill = { theme . palette . icon . default } /> }
155153 arrow
156154 />
157155 ) }
0 commit comments