-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathpage.tsx
More file actions
52 lines (46 loc) · 1.6 KB
/
Copy pathpage.tsx
File metadata and controls
52 lines (46 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
'use client';
import { Paper, Box, Grid } from '@mui/material';
import PageContainer from '@/app/(DashboardLayout)/components/container/PageContainer';
import DashboardCard from '@/app/(DashboardLayout)/components/shared/DashboardCard';
import { createTheme, ThemeProvider, styled } from '@mui/material/styles';
const Item = styled(Paper)(({ theme }) => ({
...theme.typography.body1,
textAlign: 'center',
color: theme.palette.text.secondary,
height: 60,
lineHeight: '60px',
}));
const darkTheme = createTheme({ palette: { mode: 'dark' } });
const lightTheme = createTheme({ palette: { mode: 'light' } });
const Shadow = () => {
return (
<PageContainer title="Shadow" description="this is Shadow">
<DashboardCard title="Shadow">
<Grid container spacing={2}>
{[lightTheme, darkTheme].map((theme, index) => (
<Grid item xs={6} key={index}>
<ThemeProvider theme={theme}>
<Box
sx={{
p: 2,
bgcolor: 'background.default',
display: 'grid',
gridTemplateColumns: { md: '1fr 1fr' },
gap: 2,
}}
>
{[0, 1, 2, 3, 4, 6, 8, 12, 16, 24].map((elevation) => (
<Item key={elevation} elevation={elevation}>
{`elevation=${elevation}`}
</Item>
))}
</Box>
</ThemeProvider>
</Grid>
))}
</Grid>
</DashboardCard>
</PageContainer>
);
};
export default Shadow;