Fix checkbox on dark mode

This commit is contained in:
Krzysztof Bialoglowicz 2019-09-10 17:57:52 +02:00
parent 714ea924a8
commit c0cc82aae1
3 changed files with 13 additions and 2 deletions

View file

@ -31,7 +31,7 @@ const styles = (theme: Theme) =>
"&$checked": { "&$checked": {
"&:before": { "&:before": {
background: theme.palette.primary.main, background: theme.palette.primary.main,
color: theme.palette.common.white, color: theme.palette.background.paper,
content: '"\\2713"', content: '"\\2713"',
fontWeight: "bold", fontWeight: "bold",
textAlign: "center" textAlign: "center"
@ -61,7 +61,7 @@ const styles = (theme: Theme) =>
}, },
WebkitAppearance: "none", WebkitAppearance: "none",
border: `1px solid ${theme.palette.grey[500]}`, border: `1px solid ${theme.palette.action.active}`,
boxSizing: "border-box", boxSizing: "border-box",
cursor: "pointer", cursor: "pointer",
height: 14, height: 14,

View file

@ -12,6 +12,9 @@ const dark: IThemeColors = {
default: "#1D1E1F", default: "#1D1E1F",
paper: "#2E2F31" paper: "#2E2F31"
}, },
checkbox: {
default: "#FFFFFF"
},
error: "#C22D74", error: "#C22D74",
font: { font: {
button: "#202124", button: "#202124",
@ -42,6 +45,9 @@ const light: IThemeColors = {
default: "#F1F6F6", default: "#F1F6F6",
paper: "#FFFFFF" paper: "#FFFFFF"
}, },
checkbox: {
default: "#616161"
},
error: "#C22D74", error: "#C22D74",
font: { font: {
button: "#FFFFFF", button: "#FFFFFF",

View file

@ -16,6 +16,8 @@ export type IThemeColors = Record<
string string
> & { > & {
background: Record<"default" | "paper", string>; background: Record<"default" | "paper", string>;
} & {
checkbox: Record<"default" | "disabled", string>;
} & { } & {
font: Record<"default" | "gray" | "button" | "textButton", string>; font: Record<"default" | "gray" | "button" | "textButton", string>;
} & { } & {
@ -406,6 +408,9 @@ export default (colors: IThemeColors): Theme =>
hint: colors.font.gray, hint: colors.font.gray,
primary: colors.font.default, primary: colors.font.default,
secondary: colors.font.gray secondary: colors.font.gray
},
action: {
active: colors.checkbox.default
} }
}, },
props: { props: {