Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Commit 417a83e

Browse files
authored
fix: Material-UI theme and upgraded package dependencies (#25)
1 parent a0f5b6c commit 417a83e

File tree

8 files changed

+16422
-3249
lines changed

8 files changed

+16422
-3249
lines changed

components/list/ListItem.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const useStyles = makeStyles((theme: Theme) =>
2020
padding: theme.spacing(2),
2121
},
2222
avatar: {
23-
backgroundColor: theme.palette.gray.light,
23+
backgroundColor: theme.palette.grey[100],
2424
},
2525
})
2626
);
@@ -51,7 +51,15 @@ export default function ListItem({ name, image, link }: Props) {
5151
<ListItemText>
5252
<Typography variant="body1">{name}</Typography>
5353
</ListItemText>
54-
<Grid container item xs={12} md={3} className={classes.info} justify="flex-end" alignItems="center">
54+
<Grid
55+
container
56+
item
57+
xs={12}
58+
md={3}
59+
className={classes.info}
60+
justifyContent="flex-end"
61+
alignItems="center"
62+
>
5563
<Link href={link.href} as={link?.as} label={link.label} />
5664
</Grid>
5765
</Grid>

lib/theme.ts

+9-41
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
import { createMuiTheme, responsiveFontSizes, ThemeOptions } from '@material-ui/core/styles';
2-
1+
import { createTheme, responsiveFontSizes, ThemeOptions } from '@material-ui/core/styles';
32
import '@material-ui/core/styles';
43

5-
declare module '@material-ui/core/styles/createPalette' {
6-
interface Palette {
7-
priority: Palette['primary'];
8-
gray: Palette['primary'];
9-
shadow: Palette['primary'];
10-
}
11-
interface PaletteOptions {
12-
priority: PaletteOptions['primary'];
13-
gray: PaletteOptions['primary'];
14-
shadow: PaletteOptions['primary'];
15-
}
16-
}
17-
184
declare module '@material-ui/core/styles/createTypography' {
195
interface Typography {
206
fontWeightHeavy: number;
@@ -66,34 +52,16 @@ const THEME: ThemeOptions = {
6652
},
6753
},
6854
palette: {
69-
primary: {
70-
light: '#d0df63',
71-
main: '#016848',
72-
dark: '#003b21',
73-
},
74-
secondary: {
75-
light: '#577984',
76-
main: '#1a3a44',
77-
dark: '#00151d',
78-
contrastText: '#d8ddea',
79-
},
80-
priority: {
81-
light: '#2f78c5',
82-
main: '#d35400',
83-
dark: '#8b0000',
84-
},
85-
gray: {
86-
light: '#EEEEEE',
87-
main: '#888888',
88-
dark: '#212121',
89-
contrastText: '#5a5a5a',
90-
},
91-
shadow: {
92-
main: 'rgba(1, 104, 72, 0.16)',
93-
},
55+
primary: { main: '#016848', dark: '#1f5849', light: '#388e3c' },
56+
secondary: { main: '#8bc34a', dark: '#689f38', light: '#d0df63' },
57+
contrastThreshold: 3,
58+
tonalOffset: 0.5,
59+
},
60+
shape: {
61+
borderRadius: 4,
9462
},
9563
};
9664

97-
const theme = responsiveFontSizes(createMuiTheme(THEME));
65+
const theme = responsiveFontSizes(createTheme(THEME));
9866

9967
export default theme;

next-env.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/types/global" />
3+
/// <reference types="next/image-types/global" />
4+
5+
// NOTE: This file should not be edited
6+
// see https://nextjs.org/docs/basic-features/typescript for more information.

0 commit comments

Comments
 (0)