Skip to content

Commit

Permalink
#13 Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhya-metacell committed Jul 21, 2022
1 parent cfd270d commit 29e4ff9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
7 changes: 5 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { makeStyles } from '@mui/styles';
import Sidebar from './components/Sidebar';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import theme from "./theme";
import theme from './theme';
import { Box } from '@mui/material';

const useStyles = makeStyles(_ => ({
Expand Down Expand Up @@ -83,7 +83,10 @@ const MetaDiagram = ({
<CssBaseline />
<Box className={containerClassName}>
<Sidebar />
<CanvasWidget className={`${classes.canvasContainer} ${canvasClassName}`} engine={engine} />
<CanvasWidget
className={`${classes.canvasContainer} ${canvasClassName}`}
engine={engine}
/>
</Box>
</ThemeProvider>
);
Expand Down
35 changes: 14 additions & 21 deletions src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const applicationTheme = (params: ThemeVars) => {
listItemActiveBg,
listSelectedTextColor,
listBoxShadow,
listBorderColor
listBorderColor,
} = params;
return {
components: {
Expand All @@ -31,7 +31,6 @@ const applicationTheme = (params: ThemeVars) => {
}
`,
},

MuiList: {
styleOverrides: {
root: {
Expand All @@ -40,59 +39,50 @@ const applicationTheme = (params: ThemeVars) => {
background: chipTextColor,
borderRadius: '0.5rem',
display: 'flex',

'& .MuiListItemButton-root': {
padding: '0.25rem 0.75rem',
borderRadius: '0.4375rem',
width: '10.59375rem',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',

'&:not(:last-child)': {
marginBottom: '0',
},

'&.Mui-disabled': {
opacity: 1,
},

'&.Mui-selected': {
background: textWhite,
boxShadow: listBoxShadow,
border: `0.03125rem solid ${listBorderColor}`,

'& .MuiTypography-root': {
color: listSelectedTextColor
color: listSelectedTextColor,
},
},
},

'& .MuiChip-root': {
marginLeft: '0.25rem'
marginLeft: '0.25rem',
},

'& .MuiTypography-root': {
fontWeight: 500,
fontSize: '0.8125rem',
lineHeight: '1.25rem',
letterSpacing: '-0.005rem',
color: chipBgColor,
margin: 0
margin: 0,
},
},
}
}
},
},
},

MuiListItemIcon: {
styleOverrides: {
root: {
minWidth: 'inherit'
minWidth: 'inherit',
},
}
},
},

MuiListItemButton: {
styleOverrides: {
root: {
Expand All @@ -114,15 +104,18 @@ const applicationTheme = (params: ThemeVars) => {
backgroundColor: listItemActiveBg,
},
},

'&.Mui-disabled': {
opacity: 0.8,
},
},
}
},
},
},
};
};

export default (customVariables: ThemeVars) => applicationTheme({ ...vars, ...customVariables });
export default (customVariables: ThemeVars) =>
applicationTheme({
...vars,
...customVariables,
});

0 comments on commit 29e4ff9

Please sign in to comment.