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

fix: Material-UI theme and upgraded package dependencies #25

Merged
merged 1 commit into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions components/list/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useStyles = makeStyles((theme: Theme) =>
padding: theme.spacing(2),
},
avatar: {
backgroundColor: theme.palette.gray.light,
backgroundColor: theme.palette.grey[100],
},
})
);
Expand Down Expand Up @@ -51,7 +51,15 @@ export default function ListItem({ name, image, link }: Props) {
<ListItemText>
<Typography variant="body1">{name}</Typography>
</ListItemText>
<Grid container item xs={12} md={3} className={classes.info} justify="flex-end" alignItems="center">
<Grid
container
item
xs={12}
md={3}
className={classes.info}
justifyContent="flex-end"
alignItems="center"
>
<Link href={link.href} as={link?.as} label={link.label} />
</Grid>
</Grid>
Expand Down
50 changes: 9 additions & 41 deletions lib/theme.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
import { createMuiTheme, responsiveFontSizes, ThemeOptions } from '@material-ui/core/styles';

import { createTheme, responsiveFontSizes, ThemeOptions } from '@material-ui/core/styles';
import '@material-ui/core/styles';

declare module '@material-ui/core/styles/createPalette' {
interface Palette {
priority: Palette['primary'];
gray: Palette['primary'];
shadow: Palette['primary'];
}
interface PaletteOptions {
priority: PaletteOptions['primary'];
gray: PaletteOptions['primary'];
shadow: PaletteOptions['primary'];
}
}

declare module '@material-ui/core/styles/createTypography' {
interface Typography {
fontWeightHeavy: number;
Expand Down Expand Up @@ -66,34 +52,16 @@ const THEME: ThemeOptions = {
},
},
palette: {
primary: {
light: '#d0df63',
main: '#016848',
dark: '#003b21',
},
secondary: {
light: '#577984',
main: '#1a3a44',
dark: '#00151d',
contrastText: '#d8ddea',
},
priority: {
light: '#2f78c5',
main: '#d35400',
dark: '#8b0000',
},
gray: {
light: '#EEEEEE',
main: '#888888',
dark: '#212121',
contrastText: '#5a5a5a',
},
shadow: {
main: 'rgba(1, 104, 72, 0.16)',
},
primary: { main: '#016848', dark: '#1f5849', light: '#388e3c' },
secondary: { main: '#8bc34a', dark: '#689f38', light: '#d0df63' },
contrastThreshold: 3,
tonalOffset: 0.5,
},
shape: {
borderRadius: 4,
},
};

const theme = responsiveFontSizes(createMuiTheme(THEME));
const theme = responsiveFontSizes(createTheme(THEME));

export default theme;
4 changes: 4 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading