Skip to content

Commit 2edc6c8

Browse files
committed
Try fixing problem with mui 5.11
1 parent a898c51 commit 2edc6c8

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codegouvfr/react-dsfr",
3-
"version": "0.5.1",
3+
"version": "0.5.2-rc.0",
44
"description": "French State Design System React integration library",
55
"repository": {
66
"type": "git",

src/mui.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { spacingTokenByValue } from "./lib/generatedFromCss/spacing";
1111
import type { ColorTheme } from "./lib/colors";
1212
import { assert } from "tsafe/assert";
1313
import { objectKeys } from "tsafe/objectKeys";
14-
import defaultMuiShadows from "@mui/material/styles/shadows";
1514
import type { Shadows } from "@mui/material/styles";
1615
import { id } from "tsafe/id";
1716

@@ -136,8 +135,6 @@ export function getMuiDsfrThemeOptions(params: { isDark: boolean }): ThemeOption
136135
})();
137136
})(),
138137
"shadows": (() => {
139-
const [, , , , , , , , ...rest] = defaultMuiShadows;
140-
141138
return id<Shadows>([
142139
"none",
143140
/** ButtonBar shadow */
@@ -154,7 +151,23 @@ export function getMuiDsfrThemeOptions(params: { isDark: boolean }): ThemeOption
154151
"0px 6px 10px 0px rgba(0,0,0,0.14)",
155152
/** Dialog **/
156153
"0px 8px 10px -7px rgba(0,0,0,0.07)",
157-
...rest
154+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
155+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
156+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
157+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
158+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
159+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
160+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
161+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
162+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
163+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
164+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
165+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
166+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
167+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
168+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
169+
"0px 8px 10px -7px rgba(0,0,0,0.07)",
170+
"0px 8px 10px -7px rgba(0,0,0,0.07)"
158171
]);
159172
})(),
160173
"components": {

0 commit comments

Comments
 (0)