Skip to content

Commit 077f338

Browse files
[examples] Upgrade themed example for X v8 (#4893)
1 parent 546a354 commit 077f338

File tree

9 files changed

+11
-90
lines changed

9 files changed

+11
-90
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11

2-
AUTH_SECRET="cNU2IkgN6v9dVQ1EqbCe4Npqh0IbM6VEsMBpg69wiyU=" # Added by `npx auth`. Read more: https://cli.authjs.dev
3-
AUTH_URL="https://r3l69w-3000.csb.app"
2+
AUTH_SECRET="cNU2IkgN6v9dVQ1EqbCe4Npqh0IbM6VEsMBpg69wiyU=" # Added by `npx auth`. Read more: https://cli.authjs.dev

examples/core/auth-nextjs-themed/app/components/ChartUserByCountry.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,12 @@ export default function ChartUserByCountry() {
135135
innerRadius: 75,
136136
outerRadius: 100,
137137
paddingAngle: 0,
138-
highlightScope: { faded: 'global', highlighted: 'item' },
138+
highlightScope: { fade: 'global', highlight: 'item' },
139139
},
140140
]}
141141
height={260}
142142
width={260}
143-
slotProps={{
144-
legend: { hidden: true },
145-
}}
143+
hideLegend
146144
>
147145
<PieCenterLabel primaryText="50K" secondaryText="Total" />
148146
</PieChart>

examples/core/auth-nextjs-themed/app/components/CustomDatePicker.tsx

Lines changed: 0 additions & 71 deletions
This file was deleted.

examples/core/auth-nextjs-themed/app/components/PageViewsBarChart.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ export default function PageViewsBarChart() {
7373
height={250}
7474
margin={{ left: 50, right: 0, top: 20, bottom: 20 }}
7575
grid={{ horizontal: true }}
76-
slotProps={{
77-
legend: {
78-
hidden: true,
79-
},
80-
}}
76+
hideLegend
8177
/>
8278
</CardContent>
8379
</Card>

examples/core/auth-nextjs-themed/app/components/SessionsChart.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ export default function SessionsChart() {
134134
fill: "url('#direct')",
135135
},
136136
}}
137-
slotProps={{
138-
legend: {
139-
hidden: true,
140-
},
141-
}}
137+
hideLegend
142138
>
143139
<AreaGradient color={theme.palette.primary.dark} id="organic" />
144140
<AreaGradient color={theme.palette.primary.main} id="referral" />

examples/core/auth-nextjs-themed/app/components/StatCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default function StatCard({ title, value, interval, trend, data }: StatCa
8383
</Stack>
8484
<Box sx={{ width: '100%', height: 50 }}>
8585
<SparkLineChart
86-
colors={[chartColor]}
86+
color={chartColor}
8787
data={data}
8888
area
8989
showHighlight

examples/core/auth-nextjs-themed/app/mocks/gridData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function renderSparklineCell(params: GridCellParams<SparkLineData, any>) {
3838
plotType="bar"
3939
showHighlight
4040
showTooltip
41-
colors={['hsl(210, 98%, 42%)']}
41+
color="hsl(210, 98%, 42%)"
4242
xAxis={{
4343
scaleType: 'band',
4444
data,

examples/core/auth-nextjs-themed/app/mocks/gridOrdersData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function renderSparklineCell(params: GridCellParams<SparkLineData, any>) {
3838
plotType="bar"
3939
showHighlight
4040
showTooltip
41-
colors={['hsl(210, 98%, 42%)']}
41+
color="hsl(210, 98%, 42%)"
4242
xAxis={{
4343
scaleType: 'band',
4444
data,

examples/core/auth-nextjs-themed/theme/customizations/dataDisplay.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export const dataDisplayCustomizations: Components<Theme> = {
4747
[`& .${svgIconClasses.root}`]: {
4848
color: theme.palette.text.primary,
4949
},
50+
[`& .${typographyClasses.root}`]: {
51+
color: theme.palette.text.primary,
52+
},
5053
'&:focus-visible': {
5154
backgroundColor: alpha(theme.palette.action.selected, 0.3),
5255
},

0 commit comments

Comments
 (0)