fix: admin/login: in dark mode, label is unreadable when autofilled by chrome

Massimo Melina committed Jun 16, 2022 at 11:11 UTC 986a17f36bc8f045e214013a508acfd4235256f0
1 file changed +4 -1
admin/src/theme.ts
+4 -1
@@ -17,7 +17,10 @@ export function useMyTheme() {
17 },
18 components: {
19 MuiTextField: {
20 - defaultProps: { variant: 'filled' }
20 + defaultProps: { variant: 'filled' },
21 + styleOverrides: lightMode || {
22 + root: { '& label.Mui-focused': { color: '#ccc' } } // our primary.main is too dark for mui's dark theme, and when input element is :-webkit-autofill it will make not enough contrast
23 + }
24 },
25 MuiButton: {
26 defaultProps: { variant: 'outlined' },