Skip to content

Commit

Permalink
fix: config MUI Popover for tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
David Horm committed Mar 11, 2023
1 parent 5efad88 commit 96f0865
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/ServiceProvider/StyleProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ import {
createTheme,
} from "@mui/material/styles";

const theme = createTheme();
const rootElement = document.getElementById("root");
const theme = createTheme({
components: {
MuiPopover: {
defaultProps: {
container: rootElement,
},
},
MuiPopper: {
defaultProps: {
container: rootElement,
},
},
},
});

export const StyleProvider = ({ children }: PropsWithChildren<object>) => (
<StyledEngineProvider injectFirst>
Expand Down

0 comments on commit 96f0865

Please sign in to comment.