Skip to content

Commit

Permalink
add disabled state (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos authored Oct 3, 2024
1 parent c30ec0a commit 22d9555
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/theme/components/MuiTextField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,22 @@ const MuiTextField: Components["MuiTextField"] = {
width: "100%",
backgroundColor: "transparent",
[`& > .${inputBaseClasses.root}`]: {
border: "1px solid black !important",
borderRadius: "0px !important",
backgroundColor: "white !important",
...(ownerState.disabled
? {
border: "0px !important",
borderRadius: "0px !important",
// @ts-expect-error
backgroundColor: `${palette.info!.main} !important`,
[`.${inputBaseClasses.disabled}`]: {
color: `${typography.body1!.color} !important`,
"-webkit-text-fill-color": "unset",
},
}
: {
border: "1px solid black !important",
borderRadius: "0px !important",
backgroundColor: "white !important",
}),
},
[`& > .${inputBaseClasses.root}.${inputBaseClasses.error}`]: {
// @ts-expect-error
Expand All @@ -35,13 +48,13 @@ const MuiTextField: Components["MuiTextField"] = {
borderColor: "black !important",
},
[`.${svgIconClasses.root}`]: {
color: `${typography.body1?.color} !important`,
color: `${typography.body1!.color} !important`,
},
[`.${filledInputClasses.root}::after`]: {
borderColor: `${typography.body1?.color} !important`,
borderColor: `${typography.body1!.color} !important`,
},
[`.${formLabelClasses.root}`]: {
color: `${typography.body1?.color} !important`,
color: `${typography.body1!.color} !important`,
},
[`.${formHelperTextClasses.root}`]: {
fontSize: "12px !important",
Expand Down

0 comments on commit 22d9555

Please sign in to comment.