Skip to content

Commit

Permalink
fix: list item text
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jul 6, 2023
1 parent 0013dbd commit 922a9f4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/theme/components/MuiListItemText.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { listItemTextClasses } from '@mui/material';

import { includesClassNames } from '../../helpers';
import Components from './_components';

const MuiListItemText: Components['MuiListItemText'] = {
styleOverrides: {
root: ({ ownerState }) => ({
...(includesClassNames(ownerState, ['last']) && {
[`.${listItemTextClasses.primary}`]: {
marginBottom: 0
}
})
})
}
};

export default MuiListItemText;
2 changes: 2 additions & 0 deletions src/theme/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import MuiGrid2 from './MuiGrid2';
import MuiInputAdornment from './MuiInputAdornment';
import MuiInputBase from './MuiInputBase';
import MuiLink from './MuiLink';
import MuiListItemText from './MuiListItemText';
import MuiMenu from './MuiMenu';
import MuiMenuItem from './MuiMenuItem';
import MuiSelect from './MuiSelect';
Expand All @@ -37,6 +38,7 @@ const components: ThemeOptions['components'] = {
MuiInputAdornment,
MuiInputBase,
MuiLink,
MuiListItemText,
MuiMenu,
MuiMenuItem,
MuiSelect,
Expand Down

0 comments on commit 922a9f4

Please sign in to comment.