Fix disabled input style

This commit is contained in:
Krzysztof Bialoglowicz 2019-09-03 13:29:40 +02:00
parent 41c1b6b067
commit 8653b8cf3c
2 changed files with 17 additions and 4 deletions

View file

@ -26,7 +26,8 @@ const dark: IThemeColors = {
input: { input: {
border: "#9d9d9d", border: "#9d9d9d",
default: "#25262A", default: "#25262A",
disabled: "none", disabled: "#393939",
disabledBackground: "#292A2D",
text: "#FCFCFC", text: "#FCFCFC",
textHover: "#616161" textHover: "#616161"
}, },
@ -55,6 +56,8 @@ const light: IThemeColors = {
border: "#616161", border: "#616161",
default: "#FFFFFF", default: "#FFFFFF",
disabled: "#EAEAEA", disabled: "#EAEAEA",
disabledBackground: "#F4F4F4",
disabledText: "#9D9D9D",
text: "#3D3D3D", text: "#3D3D3D",
textHover: "#616161" textHover: "#616161"
}, },

View file

@ -22,7 +22,13 @@ export type IThemeColors = Record<
gray: Record<"default" | "disabled", string>; gray: Record<"default" | "disabled", string>;
} & { } & {
input: Record< input: Record<
"default" | "border" | "disabled" | "text" | "textHover", | "default"
| "border"
| "disabled"
| "disabledBackground"
| "disabledText"
| "text"
| "textHover",
string string
>; >;
}; };
@ -121,6 +127,9 @@ export default (colors: IThemeColors): Theme =>
} }
}, },
MuiInputLabel: { MuiInputLabel: {
disabled: {
color: `${fade(colors.primary, 0.4)} !important` as any
},
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",
@ -197,10 +206,11 @@ export default (colors: IThemeColors): Theme =>
}, },
"&$disabled": { "&$disabled": {
"& fieldset": { "& fieldset": {
backgroundColor: colors.input.disabled backgroundColor: colors.input.disabledBackground,
borderColor: [[colors.input.disabled], "!important"] as any
}, },
"& input": { "& input": {
color: colors.input.text, color: colors.input.disabledText,
zIndex: 2 zIndex: 2
} }
}, },