Skip to content

Commit ca960b2

Browse files
committed
feat(OutlinedInput): Adjust styles according to specs
1 parent 55b4ae1 commit ca960b2

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

react/MuiCozyTheme/overrides/makeLightInvertedOverrides.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@ import { makeLightNormalOverrides } from './makeLightNormalOverrides'
44

55
export const makeLightInvertedOverrides = theme => {
66
const makeOverridesForInvertedTheme = theme => ({
7-
MuiOutlinedInput: {
8-
root: {
9-
boxSizing: 'border-box',
10-
'&$disabled': {
11-
background: 'initial'
12-
},
13-
'&$focused $notchedOutline': {
14-
borderColor: theme.palette.text.primary,
15-
borderWidth: '0.0625rem'
16-
},
17-
'& $notchedOutline': {
18-
borderColor: theme.palette.text.primary
19-
}
20-
}
21-
},
227
MuiLinearProgress: {
238
colorPrimary: {
249
backgroundColor: 'rgba(255,255,255,0.2)'

react/MuiCozyTheme/overrides/makeLightNormalOverrides.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,30 @@ export const makeLightNormalOverrides = theme => ({
1515
root: {
1616
borderRadius: 4,
1717
'&$disabled': {
18-
background: theme.palette.grey[100]
18+
background: theme.palette.background.contrast
1919
},
2020
'&$focused $notchedOutline': {
2121
borderWidth: '0.0625rem'
2222
},
23+
'&$error $notchedOutline': {
24+
borderColor: alpha(
25+
theme.palette.error.main,
26+
theme.palette.border.opacity
27+
)
28+
},
29+
'&$focused&$error $notchedOutline': {
30+
borderColor: theme.palette.error.main
31+
},
2332
'&:hover $notchedOutline': {
24-
borderColor: theme.palette.grey[300]
33+
borderColor: theme.palette.text.hint
34+
},
35+
'&:hover&$error $notchedOutline': {
36+
borderColor: theme.palette.error.main
2537
}
2638
},
2739
notchedOutline: {
28-
borderColor: theme.palette.grey[200]
40+
borderColor: theme.palette.border.main,
41+
transition: `border-color ${theme.transitions.duration.shorter}ms`
2942
},
3043
input: {
3144
padding: '18.5px 16px'
@@ -328,10 +341,10 @@ export const makeLightNormalOverrides = theme => ({
328341
paddingBottom: 8,
329342
paddingTop: 8,
330343
marginBottom: '0.5rem',
331-
backgroundColor: theme.palette.background.default
344+
backgroundColor: theme.palette.background.contrast
332345
},
333346
sticky: {
334-
backgroundColor: theme.palette.background.default
347+
backgroundColor: theme.palette.background.contrast
335348
}
336349
},
337350
MuiListItemText: {
@@ -717,7 +730,7 @@ export const makeLightNormalOverrides = theme => ({
717730
padding: '12px',
718731
'&$disabled svg': {
719732
borderRadius: '50%',
720-
backgroundColor: theme.palette.background.default,
733+
backgroundColor: theme.palette.background.contrast,
721734
fill: theme.palette.border.disabled
722735
},
723736
'&:not($checked) svg': {

0 commit comments

Comments
 (0)