Fix input error style

This commit is contained in:
Krzysztof Bialoglowicz 2019-09-26 16:23:51 +02:00
parent edc50a46bb
commit a20d6fe6d8

View file

@ -111,11 +111,6 @@ export default (colors: IThemeColors): Theme =>
MuiFormLabel: { MuiFormLabel: {
filled: { filled: {
color: [[colors.primary], "!important"] as any color: [[colors.primary], "!important"] as any
},
root: {
"&$focused": {
color: [[colors.font.gray], "!important"] as any
}
} }
}, },
MuiIconButton: { MuiIconButton: {
@ -154,6 +149,12 @@ export default (colors: IThemeColors): Theme =>
} }
}, },
MuiInputLabel: { MuiInputLabel: {
error: {
"&$focused": {
color: colors.error
},
color: colors.error
},
formControl: { formControl: {
transform: "translate(0, 1.5px) scale(0.75)", transform: "translate(0, 1.5px) scale(0.75)",
transformOrigin: "top left" as "top left", transformOrigin: "top left" as "top left",
@ -171,7 +172,7 @@ export default (colors: IThemeColors): Theme =>
color: `${fade(colors.primary, 0.4)} !important` as any color: `${fade(colors.primary, 0.4)} !important` as any
}, },
"&$focused": { "&$focused": {
color: [[colors.primary], "!important"] as any color: colors.primary
}, },
color: colors.input.text color: colors.input.text
}, },
@ -223,6 +224,26 @@ export default (colors: IThemeColors): Theme =>
} }
}, },
MuiOutlinedInput: { MuiOutlinedInput: {
error: {
"&$focused": {
"& fieldset": {
borderColor: [[colors.error], "!important"] as any
},
"& input": {
color: colors.error,
zIndex: 2
}
},
"&:hover": {
"& fieldset": {
borderColor: [[colors.error], "!important"] as any
},
"& input": {
color: colors.error,
zIndex: 2
}
}
},
input: { input: {
"&:-webkit-autofill": { "&:-webkit-autofill": {
boxShadow: `0 0 0px 1000px rgba(19, 190, 187, 0.1) inset`, boxShadow: `0 0 0px 1000px rgba(19, 190, 187, 0.1) inset`,
@ -246,7 +267,7 @@ export default (colors: IThemeColors): Theme =>
root: { root: {
"& fieldset": { "& fieldset": {
background: colors.background.paper, background: colors.background.paper,
borderColor: [[colors.input.border], "!important"] as any borderColor: colors.input.border
}, },
"& legend": { "& legend": {
display: "none" display: "none"