Closed maakcode closed 8 months ago
Thanks for reporting. I think it is only a type error. The following fix should work:
--- a/packages/mui-joy/src/ModalDialog/ModalDialogProps.ts
+++ b/packages/mui-joy/src/ModalDialog/ModalDialogProps.ts
@@ -60,7 +60,7 @@ export interface ModalDialogTypeMap<P = {}, D extends React.ElementType = 'div'>
* The layout of the dialog
* @default 'center'
*/
- layout?: 'center' | 'fullscreen';
+ layout?: OverridableStringUnion<'center' | 'fullscreen', ModalDialogPropsLayoutOverrides>;
/**
* The component orientation.
* @default 'vertical'
Would you like to create a PR?
@ZeeshanTamboli Yes.
@maakcode Feel free to create a PR.
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: Link
Steps:
Current behavior 😯
Adding or removing layout props using styleOverrides has no effect.
Expected behavior 🤔
Changes take effect when you add or remove layout props using styleOverrides, as in the examples mentioned in the documentation.
Context 🔦
I wanted to add a modal layout located at the top of the screen, like the code in the example document.
Your environment 🌎
npx @mui/envinfo