5
5
makeStyles ,
6
6
styled ,
7
7
Theme ,
8
+ createTheme ,
9
+ ThemeProvider ,
10
+ withStyles
8
11
} from "@material-ui/core/styles" ;
9
12
import Button from "@material-ui/core/Button" ;
10
13
import {
@@ -24,6 +27,7 @@ import {
24
27
import StateContext from "../../context/context" ;
25
28
import TableStateProps from "./TableStateProps" ;
26
29
30
+
27
31
const StatePropsPanel = ( { isThemeLight } ) : JSX . Element => {
28
32
const classes = useStyles ( ) ;
29
33
const [ state ] = useContext ( StateContext ) ;
@@ -126,14 +130,16 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
126
130
variant = "outlined"
127
131
value = { inputKey }
128
132
onChange = { ( e ) => setInputKey ( e . target . value ) }
129
- />
133
+ className = { isThemeLight ? classes . rootLight : classes . rootDark }
134
+ />
130
135
< TextField
131
136
id = "textfield-value"
137
+ className = { isThemeLight ? classes . rootLight : classes . rootDark }
132
138
label = "value:"
133
139
variant = "outlined"
134
140
value = { inputValue }
135
141
onChange = { ( e ) => setInputValue ( e . target . value ) }
136
- />
142
+ />
137
143
< FormControl required className = { classes . formControl } >
138
144
< InputLabel id = "select-required-label" > Type</ InputLabel >
139
145
< Select
@@ -188,7 +194,7 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
188
194
} ;
189
195
190
196
const useStyles = makeStyles ( ( theme : Theme ) =>
191
- createStyles ( {
197
+ ( {
192
198
inputField : {
193
199
marginTop : "10px" ,
194
200
borderRadius : "5px" ,
@@ -294,6 +300,22 @@ const useStyles = makeStyles((theme: Theme) =>
294
300
selectEmpty : {
295
301
marginTop : theme . spacing ( 2 ) ,
296
302
} ,
303
+ color : {
304
+ color : '#fff' ,
305
+ } ,
306
+ rootLight : {
307
+ '& .MuiFormLabel-root' : {
308
+ color : 'rgba(0,0,0,0.54)'
309
+ }
310
+ } ,
311
+ rootDark : {
312
+ '& .MuiFormLabel-root' : {
313
+ color : '#fff'
314
+ } ,
315
+ '& .MuiOutlinedInput-notchedOutline' : {
316
+ borderColor : '#fff'
317
+ }
318
+ }
297
319
} )
298
320
) ;
299
321
@@ -308,4 +330,5 @@ const MyButton = styled(Button)({
308
330
padding : "0 30px" ,
309
331
} ) ;
310
332
333
+
311
334
export default StatePropsPanel ;
0 commit comments