Skip to content

Commit fad798b

Browse files
authored
Merge pull request #241 from codegouvfr/mui-autocomplete
mui: override autocomplete style
2 parents fcccc70 + 5a560ae commit fad798b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/mui.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,18 @@ export function getMuiDsfrThemeOptions(params: {
205205
},
206206
"MuiAutocomplete": {
207207
"styleOverrides": {
208+
"listbox": {
209+
"padding": 0
210+
},
208211
"option": {
209-
"border": "1px solid transparent",
212+
"padding": `${fr.spacing("2w")} !important`,
213+
"&.Mui-focused": {
214+
"backgroundColor":
215+
decisions.background.open.blueFrance.default + " !important"
216+
},
210217
"&.Mui-focusVisible": {
211218
"backgroundColor":
212-
decisions.background.contrast.grey.default + " !important",
213-
"border": `1px solid ${decisions.border.active.blueFrance.default}`
219+
decisions.background.open.blueFrance.default + " !important"
214220
}
215221
}
216222
}
@@ -331,6 +337,7 @@ export function createMuiDsfrTheme(
331337
params: { isDark: boolean; breakpointsValues: BreakpointsValues },
332338
...args: object[]
333339
): MuiTheme {
340+
console.log("test");
334341
const muiTheme = createTheme(getMuiDsfrThemeOptions(params), ...args);
335342

336343
return muiTheme;

0 commit comments

Comments
 (0)