Skip to content

Commit e602cad

Browse files
committed
Upgrade to MUI 9
1 parent ad75ba4 commit e602cad

8 files changed

Lines changed: 204 additions & 53 deletions

File tree

package-lock.json

Lines changed: 184 additions & 33 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
@@ -13,7 +13,7 @@
1313
"@emotion/react": "^11.14.0",
1414
"@emotion/styled": "^11.14.1",
1515
"@mui/icons-material": "^7.3.9",
16-
"@mui/material": "^7.3.9",
16+
"@mui/material": "^9.0.0",
1717
"@mui/x-charts": "^8.27.5",
1818
"@types/gtag.js": "^0.0.20",
1919
"@uiw/react-color": "^2.9.6",

src/components/BottomControls/BottomControls.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export const BottomControls = () => {
8787
const hasEditedTheme = Object.keys(themeOptions).length !== 0;
8888

8989
return (
90-
<Stack gap={2} sx={{ p: { xs: 2, sm: 3, md: 4 }, pt: { xs: 0, sm: 0, md: 0 } }} alignItems="center">
91-
<Stack gap={1} direction="row" sx={{ alignItems: "center" }}>
90+
<Stack sx={{ gap: 2, alignItems: "center", p: { xs: 2, sm: 3, md: 4 }, pt: { xs: 0, sm: 0, md: 0 } }}>
91+
<Stack direction="row" sx={{ gap: 2, alignItems: "center" }}>
9292
<Box
9393
sx={{
9494
backgroundImage: "conic-gradient(#ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c1, #ff0000)",

src/components/EditorPanel/EditorPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export const EditorPanel = () => {
2727
>
2828
{BUTTON_DATA.map(({ name, icon }) => (
2929
<Button key={name} variant={section === name ? "contained" : "outlined"} onClick={() => setSection(name)} sx={{ py: 1 }}>
30-
<Stack alignItems="center" gap={1}>
30+
<Stack sx={{ gap: 1, alignItems: "center" }}>
3131
{icon}
32-
<Stack height={24} sx={{ placeContent: "center" }}>
32+
<Stack sx={{ placeContent: "center", height: 24 }}>
3333
<Typography
3434
sx={{
3535
lineHeight: "1",

src/components/FieldContainer/FieldContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const FieldContainer = ({ title, children, isDefault, onReset, titleSx }:
2929
marginInlineEnd: 2,
3030
}}
3131
>
32-
<Typography textTransform="capitalize" variant="subtitle2" color="textSecondary" sx={titleSx}>
32+
<Typography variant="subtitle2" color="textSecondary" sx={{ textTransform: "capitalize", ...titleSx }}>
3333
{title}
3434
</Typography>
3535
</Box>

src/components/InfoPanel/InfoPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const InfoPanel = () => {
2020
<Stack>
2121
<Typography variant="h5">MUI&nbsp;Theme&nbsp;Builder</Typography>
2222
<Typography variant="subtitle2" color="text.secondary">
23-
Compatible with MUI 5 to 7
23+
Compatible with MUI 5 to 9
2424
</Typography>
2525
</Stack>
2626
<svg style={{ width: 0, height: 0, position: "absolute" }} aria-hidden="true" focusable="false">

src/components/MockApp/MockApp.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export const MockApp = () => {
199199
<Typography color="text.primary" variant="h6">
200200
Tuesday, October 18
201201
</Typography>
202-
<Stack direction="row" gap={1}>
202+
<Stack direction="row" sx={{ gap: 1 }}>
203203
<Button variant="outlined" startIcon={<Upgrade />} onClick={() => setIsDialogOpen(true)} className="dialog-override">
204204
Export...
205205
</Button>
@@ -251,7 +251,7 @@ export const MockApp = () => {
251251
</Link>
252252
</StyledTableBodyCell>
253253
<StyledTableBodyCell>
254-
<Stack direction="row" gap={1} alignItems="center">
254+
<Stack direction="row" sx={{ gap: 1, alignItems: "center" }}>
255255
<Avatar
256256
sx={{
257257
width: 24,
@@ -283,8 +283,8 @@ export const MockApp = () => {
283283
<TablePagination component="div" count={6} page={0} onPageChange={() => {}} rowsPerPage={10} />
284284
</Paper>
285285
<Paper sx={{ p: 2, flex: "1 1 250px" }} className="paper-override">
286-
<Stack direction="row" justifyContent="space-between" alignItems="center" gap={2} mb={1.5}>
287-
<Typography fontWeight="bold">Analytics</Typography>
286+
<Stack direction="row" sx={{ justifyContent: "space-between", alignItems: "center", gap: 2, mb: 1.5 }}>
287+
<Typography sx={{ fontWeight: "bold" }}>Analytics</Typography>
288288
<Select size="small" value={15} className="select-override">
289289
<MenuItem value={10}>Today</MenuItem>
290290
<MenuItem value={15}>This Week</MenuItem>
@@ -319,7 +319,7 @@ export const MockApp = () => {
319319
</Stack>
320320

321321
<Divider />
322-
<Stack pt={1.5} gap={2}>
322+
<Stack sx={{ pt: 1.5, gap: 2 }}>
323323
<Sparkline title="Tracking events" data={FAKE_DATA_1} icon={<TrackChanges fontSize="small" />} />
324324
<Sparkline title="Retention rate" data={FAKE_DATA_2} icon={<GasMeterRounded fontSize="small" />} />
325325
<Sparkline title="Customer TTRs" data={FAKE_DATA_3} icon={<AcUnitSharp fontSize="small" />} />

0 commit comments

Comments
 (0)