Skip to content

Commit 113a00b

Browse files
committed
solve css styling rewriting mui defaults
Co-authored-by: Philip Hua <[email protected]> Co-authored-by: Miles Wright <[email protected]> Co-authored-by: William Rittwage <[email protected]> Co-authored-by: Daniel Reilley <[email protected]>
1 parent de69300 commit 113a00b

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

app/src/components/bottom/BottomTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const useStyles = makeStyles(theme => ({
117117

118118
},
119119
rootLight: isThemeLight => ({
120-
backgroundColor: isThemeLight ? '#003366': 'rgb(33,34,45)'
120+
backgroundColor: isThemeLight ? 'blue': 'red'
121121
}),
122122
bottomHeader: {
123123
flex: 1,

app/src/components/right/StatePropsPanel.tsx

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import {
55
makeStyles,
66
styled,
77
Theme,
8+
createTheme,
9+
ThemeProvider,
10+
withStyles
811
} from "@material-ui/core/styles";
912
import Button from "@material-ui/core/Button";
1013
import {
@@ -24,6 +27,7 @@ import {
2427
import StateContext from "../../context/context";
2528
import TableStateProps from "./TableStateProps";
2629

30+
2731
const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
2832
const classes = useStyles();
2933
const [state] = useContext(StateContext);
@@ -126,14 +130,16 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
126130
variant="outlined"
127131
value={inputKey}
128132
onChange={(e) => setInputKey(e.target.value)}
129-
/>
133+
className={isThemeLight ? classes.rootLight : classes.rootDark}
134+
/>
130135
<TextField
131136
id="textfield-value"
137+
className={isThemeLight ? classes.rootLight : classes.rootDark}
132138
label="value:"
133139
variant="outlined"
134140
value={inputValue}
135141
onChange={(e) => setInputValue(e.target.value)}
136-
/>
142+
/>
137143
<FormControl required className={classes.formControl}>
138144
<InputLabel id="select-required-label">Type</InputLabel>
139145
<Select
@@ -188,7 +194,7 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
188194
};
189195

190196
const useStyles = makeStyles((theme: Theme) =>
191-
createStyles({
197+
({
192198
inputField: {
193199
marginTop: "10px",
194200
borderRadius: "5px",
@@ -294,6 +300,22 @@ const useStyles = makeStyles((theme: Theme) =>
294300
selectEmpty: {
295301
marginTop: theme.spacing(2),
296302
},
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+
}
297319
})
298320
);
299321

@@ -308,4 +330,5 @@ const MyButton = styled(Button)({
308330
padding: "0 30px",
309331
});
310332

333+
311334
export default StatePropsPanel;

0 commit comments

Comments
 (0)