fix: update TextInput border color to match dropdown (#2406)
This commit is contained in:
1 parent
3cd8191aa4
commit
9242612f30
1 file changed
+58
-52
@@ -302,59 +302,65 @@ const baseTheme = (palette) => ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
MuiTextField: {
|
MuiTextField: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
"& fieldset": {
|
"& fieldset": {
|
||||||
borderColor: theme.palette.primary.contrastBorder,
|
borderColor: theme.palette.primary.lowContrast,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
},
|
},
|
||||||
|
|
||||||
"& .MuiInputBase-input": {
|
"& .MuiInputBase-input": {
|
||||||
padding: ".75em",
|
padding: ".75em",
|
||||||
minHeight: "var(--env-var-height-2)",
|
minHeight: "var(--env-var-height-2)",
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
color: palette.primary.contrastTextSecondary,
|
color: palette.primary.contrastTextSecondary,
|
||||||
"&.Mui-disabled": {
|
"&.Mui-disabled": {
|
||||||
opacity: 0.3,
|
opacity: 0.3,
|
||||||
WebkitTextFillColor: "unset",
|
WebkitTextFillColor: "unset",
|
||||||
},
|
},
|
||||||
"& .Mui-focused": {
|
"& .Mui-focused": {
|
||||||
/* color: "#ff0000", */
|
/* color: "#ff0000", */
|
||||||
/* borderColor: theme.palette.primary.contrastText, */
|
/* borderColor: theme.palette.primary.contrastText, */
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"& .MuiInputBase-input:-webkit-autofill": {
|
|
||||||
transition: "background-color 5000s ease-in-out 0s",
|
|
||||||
WebkitBoxShadow: `0 0 0px 1000px ${theme.palette.primary.main} inset`,
|
|
||||||
WebkitTextFillColor: theme.palette.primary.contrastText,
|
|
||||||
},
|
|
||||||
"& .MuiInputBase-input.MuiOutlinedInput-input": {
|
|
||||||
padding: "0 var(--env-var-spacing-1-minus) !important",
|
|
||||||
},
|
|
||||||
"& .MuiOutlinedInput-root": {
|
|
||||||
color: theme.palette.primary.contrastTextSecondary,
|
|
||||||
borderRadius: 4,
|
|
||||||
},
|
|
||||||
"& .MuiOutlinedInput-notchedOutline": {
|
|
||||||
borderRadius: 4,
|
|
||||||
},
|
|
||||||
|
|
||||||
"& .MuiFormHelperText-root": {
|
"& .MuiInputBase-input:-webkit-autofill": {
|
||||||
color: palette.error.main,
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
opacity: 0.8,
|
WebkitBoxShadow: `0 0 0px 1000px ${theme.palette.primary.main} inset`,
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
WebkitTextFillColor: theme.palette.primary.contrastText,
|
||||||
marginLeft: 0,
|
},
|
||||||
},
|
|
||||||
"& .MuiFormHelperText-root.Mui-error": {
|
"& .MuiInputBase-input.MuiOutlinedInput-input": {
|
||||||
opacity: 0.8,
|
padding: "0 var(--env-var-spacing-1-minus) !important",
|
||||||
fontSize: "var(--env-var-font-size-medium)",
|
},
|
||||||
color: palette.error.main,
|
|
||||||
whiteSpace: "nowrap",
|
"& .MuiOutlinedInput-root": {
|
||||||
},
|
color: theme.palette.primary.contrastTextSecondary,
|
||||||
}),
|
borderRadius: 4,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"& .MuiOutlinedInput-notchedOutline": {
|
||||||
|
borderRadius: 4,
|
||||||
|
},
|
||||||
|
|
||||||
|
"& .MuiFormHelperText-root": {
|
||||||
|
color: palette.error.main,
|
||||||
|
opacity: 0.8,
|
||||||
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
|
marginLeft: 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
"& .MuiFormHelperText-root.Mui-error": {
|
||||||
|
opacity: 0.8,
|
||||||
|
fontSize: "var(--env-var-font-size-medium)",
|
||||||
|
color: palette.error.main,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
MuiOutlinedInput: {
|
MuiOutlinedInput: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
@@ -365,12 +371,12 @@ const baseTheme = (palette) => ({
|
|||||||
borderColor: palette.primary.contrastBorderDisabled,
|
borderColor: palette.primary.contrastBorderDisabled,
|
||||||
},
|
},
|
||||||
"&:hover .MuiOutlinedInput-notchedOutline": {
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: palette.primary.contrastText, // Adjust hover border color
|
borderColor: palette.primary.lowContrast, // Adjust hover border color
|
||||||
},
|
},
|
||||||
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
||||||
borderColor: palette.accent.main, // Adjust focus border color
|
borderColor: palette.accent.main, // Adjust focus border color
|
||||||
},
|
},
|
||||||
color: palette.primary.contrastTextTertiary,
|
color: palette.primary.contrastText,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user