Skip to content

Commit ae617e8

Browse files
Fix custom theme variables used
1 parent b2afa56 commit ae617e8

File tree

4 files changed

+10
-73
lines changed

4 files changed

+10
-73
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dependencies": {
1717
"@emotion/react": "^11.14.0",
1818
"@emotion/styled": "^11.14.1",
19-
"@gridsuite/commons-ui": "0.126.0",
19+
"@gridsuite/commons-ui": "file:../commons-ui/gridsuite-commons-ui-0.126.0.tgz",
2020
"@hookform/resolvers": "^4.1.3",
2121
"@mui/icons-material": "^5.18.0",
2222
"@mui/lab": "5.0.0-alpha.175",

src/components/App/AppWrapper.tsx

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,7 @@ const lightTheme: ThemeOptions = {
5353
palette: {
5454
mode: 'light',
5555
},
56-
arrow: {
57-
fill: '#212121',
58-
stroke: '#212121',
59-
},
60-
arrow_hover: {
61-
fill: 'white',
62-
stroke: 'white',
63-
},
64-
circle: {
65-
stroke: 'white',
66-
fill: 'white',
67-
},
68-
circle_hover: {
69-
stroke: '#212121',
70-
fill: '#212121',
71-
},
72-
link: {
73-
color: 'blue',
74-
},
75-
aggrid: {
56+
agGrid: {
7657
theme: 'ag-theme-alpine',
7758
},
7859
};
@@ -81,26 +62,7 @@ const darkTheme: ThemeOptions = {
8162
palette: {
8263
mode: 'dark',
8364
},
84-
arrow: {
85-
fill: 'white',
86-
stroke: 'white',
87-
},
88-
arrow_hover: {
89-
fill: '#424242',
90-
stroke: '#424242',
91-
},
92-
circle: {
93-
stroke: '#424242',
94-
fill: '#424242',
95-
},
96-
circle_hover: {
97-
stroke: 'white',
98-
fill: 'white',
99-
},
100-
link: {
101-
color: 'green',
102-
},
103-
aggrid: {
65+
agGrid: {
10466
theme: 'ag-theme-alpine-dark',
10567
},
10668
};

src/module-mui.d.ts

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,10 @@
44
* License, v. 2.0. If a copy of the MPL was not distributed with this
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
7-
// https://mui.com/material-ui/customization/theming/#typescript
8-
import { CSSObject } from '@mui/styled-engine';
9-
import { Theme as MuiTheme, ThemeOptions as MuiThemeOptions } from '@mui/material/styles/createTheme';
7+
8+
// Just to be sure that commons-ui's mui augmentation is seen by tsc
9+
import type {} from '@gridsuite/commons-ui';
1010

1111
// https://mui.com/x/react-date-pickers/quickstart/#theme-augmentation
1212
import type {} from '@mui/x-date-pickers/themeAugmentation';
13-
14-
declare module '@mui/material/styles/createTheme' {
15-
export * from '@mui/material/styles/createTheme';
16-
17-
type ThemeExtension = {
18-
arrow: CSSObject;
19-
arrow_hover: CSSObject;
20-
circle: CSSObject;
21-
circle_hover: CSSObject;
22-
link: CSSObject;
23-
mapboxStyle: string;
24-
aggrid: {
25-
theme: 'ag-theme-alpine' | 'ag-theme-alpine-dark';
26-
};
27-
agGridThemeOverride?: CSSObject;
28-
};
29-
30-
export interface Theme extends MuiTheme, ThemeExtension {}
31-
32-
// allow configuration using `createTheme`
33-
export interface ThemeOptions extends MuiThemeOptions, Partial<ThemeExtension> {}
34-
}
35-
36-
declare module '@mui/utils/capitalize' {
37-
export default function capitalize<S extends string>(string: S): Capitalize<S>;
38-
}
13+
import type {} from '@mui/x-date-pickers/AdapterDateFns';

0 commit comments

Comments
 (0)