Skip to content

Commit

Permalink
refactor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jan 24, 2024
1 parent fca5013 commit 1752730
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
4 changes: 3 additions & 1 deletion docs/data/material/components/dialogs/AlertDialogSlide.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export default function AlertDialogSlide() {
</Button>
<Dialog
open={open}
TransitionComponent={Transition}
slots={{
transition: Transition,
}}
keepMounted
onClose={handleClose}
aria-describedby="alert-dialog-slide-description"
Expand Down
6 changes: 4 additions & 2 deletions docs/data/material/components/dialogs/AlertDialogSlide.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import Dialog, { DialogSlots } from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
Expand Down Expand Up @@ -35,7 +35,9 @@ export default function AlertDialogSlide() {
</Button>
<Dialog
open={open}
TransitionComponent={Transition}
slots={{
transition: Transition as DialogSlots['transition'],
}}
keepMounted
onClose={handleClose}
aria-describedby="alert-dialog-slide-description"
Expand Down
6 changes: 5 additions & 1 deletion docs/data/material/components/dialogs/ConfirmationDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ function ConfirmationDialogRaw(props) {
<Dialog
sx={{ '& .MuiDialog-paper': { width: '80%', maxHeight: 435 } }}
maxWidth="xs"
TransitionProps={{ onEntering: handleEntering }}
slotProps={{
transition: {
onEntering: handleEntering,
},
}}
open={open}
{...other}
>
Expand Down
6 changes: 5 additions & 1 deletion docs/data/material/components/dialogs/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ function ConfirmationDialogRaw(props: ConfirmationDialogRawProps) {
<Dialog
sx={{ '& .MuiDialog-paper': { width: '80%', maxHeight: 435 } }}
maxWidth="xs"
TransitionProps={{ onEntering: handleEntering }}
slotProps={{
transition: {
onEntering: handleEntering,
},
}}
open={open}
{...other}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/dialogs/FullScreenDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function FullScreenDialog() {
fullScreen
open={open}
onClose={handleClose}
TransitionComponent={Transition}
slots={{ transition: Transition }}
>
<AppBar sx={{ position: 'relative' }}>
<Toolbar>
Expand Down
4 changes: 2 additions & 2 deletions docs/data/material/components/dialogs/FullScreenDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import Dialog, { DialogSlots } from '@mui/material/Dialog';
import ListItemText from '@mui/material/ListItemText';
import ListItemButton from '@mui/material/ListItemButton';
import List from '@mui/material/List';
Expand Down Expand Up @@ -42,7 +42,7 @@ export default function FullScreenDialog() {
fullScreen
open={open}
onClose={handleClose}
TransitionComponent={Transition}
slots={{ transition: Transition as DialogSlots['transition'] }}
>
<AppBar sx={{ position: 'relative' }}>
<Toolbar>
Expand Down

0 comments on commit 1752730

Please sign in to comment.