Skip to content

Commit

Permalink
[Popper] Add missing styleOverrides Popper type in theme (#39154)
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boström <56017794+axelbostrom@users.noreply.github.com>
Co-authored-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
  • Loading branch information
axelbostrom and ZeeshanTamboli authored Oct 9, 2023
1 parent 18c3149 commit 81b101d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/mui-material/src/styles/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export interface Components<Theme = unknown> {
};
MuiPopper?: {
defaultProps?: ComponentsProps['MuiPopper'];
styleOverrides?: ComponentsOverrides<Theme>['MuiPopper'];
};
MuiPopover?: {
defaultProps?: ComponentsProps['MuiPopover'];
Expand Down
7 changes: 7 additions & 0 deletions packages/mui-material/src/styles/createTheme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ const theme = createTheme();
{
createTheme({
components: {
MuiPopper: {
styleOverrides: {
root: {
backgroundColor: 'red',
},
},
},
MuiFormControlLabel: {
styleOverrides: {
root: {
Expand Down
2 changes: 2 additions & 0 deletions packages/mui-material/src/styles/overrides.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CSSObject, CSSInterpolation } from '@mui/system';
import { PopperClassKey } from '@mui/base/Popper';
import { ComponentsPropsList } from './props';
import { AccordionActionsClassKey } from '../AccordionActions';
import { AccordionClassKey } from '../Accordion';
Expand Down Expand Up @@ -215,6 +216,7 @@ export interface ComponentNameToClassKey {
MuiPaginationItem: PaginationItemClassKey;
MuiPaper: PaperClassKey;
MuiPopover: PopoverClassKey;
MuiPopper: PopperClassKey;
MuiRadio: RadioClassKey;
MuiRating: RatingClassKey;
MuiScopedCssBaseline: ScopedCssBaselineClassKey;
Expand Down

0 comments on commit 81b101d

Please sign in to comment.