Skip to content

Commit a682ad1

Browse files
committed
2 parents e381e0d + b62d1bd commit a682ad1

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

src/lib/shadows.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export const shadowsOption = [
2+
"none",
3+
/** Light / SM */
4+
"0px 2px 6px 0px rgba(0,0,18,0.16)",
5+
/** Light / MD */
6+
"0px 4px 12px 0px rgba(0,0,18,0.16)",
7+
/** Light / LG */
8+
"0px 6px 18px 0px rgba(0,0,18,0.16)",
9+
/** Dark / SM */
10+
"0px 2px 6px 0px rgba(0,0,18,0.32)",
11+
/** Dark / MD */
12+
"0px 4px 12px 0px rgba(0,0,18,0.32)",
13+
/** Dark / LG */
14+
"0px 4px 18px 0px rgba(0,0,18,0.32)"
15+
] as const;
16+
17+
// Shadows decisions (shadow applied to an usecase or a context)
18+
19+
/** Raised */
20+
// Use Light or Dark / SM
21+
22+
/** Overlap */
23+
// Use Light or Dark / MD
24+
25+
/** Lifted */
26+
// Use Light or Dark / LG

src/mui.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,18 @@ function createMuiDsfrTheme(params: { isDark: boolean }): MuiTheme {
3939
"contrastText": options.blueFrance._975sun113.default
4040
},
4141
"secondary": {
42-
"main": options.redMarianne.main472.default,
43-
"light": options.redMarianne._850_200.default,
44-
"dark": options.redMarianne._425_625.default,
45-
"contrastText": options.redMarianne._975_75.default
42+
"main": options.blueFrance._950_100.default,
43+
"light": options.blueFrance._950_100.active,
44+
"dark": options.blueFrance._950_100.hover,
45+
"contrastText": options.blueFrance.sun113_625.default
46+
/*
47+
"main": options.blueFrance._850_200.default,
48+
"light": options.blueFrance._850_200.active,
49+
"dark": options.blueFrance._850_200.hover,
50+
"contrastText": options.blueFrance.sun113_625.default,
51+
*/
4652
},
53+
4754
"error": {
4855
"light": options.error._425_625.active,
4956
"main": options.error._425_625.default,
@@ -76,11 +83,11 @@ function createMuiDsfrTheme(params: { isDark: boolean }): MuiTheme {
7683
},
7784
"divider": options.grey._900_175.default,
7885
"action": {
79-
"default": options.blueFrance.sun113_625.default,
86+
"default": options.grey._200_850.default,
8087
"background": options.blueFrance._925_125.default,
81-
"active": options.blueFrance.sun113_625.active,
88+
"active": options.grey._200_850.default,
8289
"hover": options.grey._975_100.default,
83-
"selected": options.blueFrance._925_125.default,
90+
"selected": options.blueFrance._925_125.active,
8491
"disabled": options.grey._625_425.default,
8592
"disabledBackground": options.grey._925_125.default,
8693
"focus": options.blueFrance.sun113_625.active
@@ -90,6 +97,9 @@ function createMuiDsfrTheme(params: { isDark: boolean }): MuiTheme {
9097
"default": options.grey._1000_50.default,
9198
"paper": options.grey._1000_100.default,
9299
"paperHover": options.grey._975_75.hover
100+
},
101+
"getContrastText": () => {
102+
return "cyan";
93103
}
94104
} as const;
95105
})(),

0 commit comments

Comments
 (0)