Skip to content

Commit 0c461df

Browse files
Revert "[Dialog] Deprecate the transition onX props (mui#22114)"
This reverts commit 1d351a8.
1 parent f773cef commit 0c461df

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

docs/pages/api-docs/dialog.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ The `MuiDialog` name can be used for providing [default props](/customization/gl
3939
| <span class="prop-name">maxWidth</span> | <span class="prop-type">'lg'<br>&#124;&nbsp;'md'<br>&#124;&nbsp;'sm'<br>&#124;&nbsp;'xl'<br>&#124;&nbsp;'xs'<br>&#124;&nbsp;false</span> | <span class="prop-default">'sm'</span> | Determine the max-width of the dialog. The dialog width grows with the size of the screen. Set to `false` to disable `maxWidth`. |
4040
| <span class="prop-name">onBackdropClick</span> | <span class="prop-type">func</span> | | Callback fired when the backdrop is clicked. |
4141
| <span class="prop-name">onClose</span> | <span class="prop-type">func</span> | | Callback fired when the component requests to be closed.<br><br>**Signature:**<br>`function(event: object, reason: string) => void`<br>*event:* The event source of the callback.<br>*reason:* Can be: `"escapeKeyDown"`, `"backdropClick"`. |
42-
| ~~<span class="prop-name">onEnter</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired before the dialog enters. |
43-
| ~~<span class="prop-name">onEntered</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired when the dialog has entered. |
44-
| ~~<span class="prop-name">onEntering</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired when the dialog is entering. |
42+
| <span class="prop-name">onEnter</span> | <span class="prop-type">func</span> | | Callback fired before the dialog enters. |
43+
| <span class="prop-name">onEntered</span> | <span class="prop-type">func</span> | | Callback fired when the dialog has entered. |
44+
| <span class="prop-name">onEntering</span> | <span class="prop-type">func</span> | | Callback fired when the dialog is entering. |
4545
| <span class="prop-name">onEscapeKeyDown</span> | <span class="prop-type">func</span> | | Callback fired when the escape key is pressed, `disableKeyboard` is false and the modal is in focus. |
46-
| ~~<span class="prop-name">onExit</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired before the dialog exits. |
47-
| ~~<span class="prop-name">onExited</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired when the dialog has exited. |
48-
| ~~<span class="prop-name">onExiting</span>~~ | <span class="prop-type">func</span> | | *Deprecated*. Use the `TransitionProps` property instead.<br><br>Callback fired when the dialog is exiting. |
46+
| <span class="prop-name">onExit</span> | <span class="prop-type">func</span> | | Callback fired before the dialog exits. |
47+
| <span class="prop-name">onExited</span> | <span class="prop-type">func</span> | | Callback fired when the dialog has exited. |
48+
| <span class="prop-name">onExiting</span> | <span class="prop-type">func</span> | | Callback fired when the dialog is exiting. |
4949
| <span class="prop-name required">open<abbr title="required">*</abbr></span> | <span class="prop-type">bool</span> | | If `true`, the Dialog is open. |
5050
| <span class="prop-name">PaperComponent</span> | <span class="prop-type">elementType</span> | <span class="prop-default">Paper</span> | The component used to render the body of the dialog. |
5151
| <span class="prop-name">PaperProps</span> | <span class="prop-type">object</span> | <span class="prop-default">{}</span> | Props applied to the [`Paper`](/api/paper/) element. |

packages/material-ui/src/Dialog/Dialog.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
33
import clsx from 'clsx';
44
import withStyles from '../styles/withStyles';
55
import capitalize from '../utils/capitalize';
6-
import deprecatedPropType from '../utils/deprecatedPropType';
76
import Modal from '../Modal';
87
import Backdrop from '../Backdrop';
98
import Fade from '../Fade';
@@ -331,15 +330,15 @@ Dialog.propTypes = {
331330
/**
332331
* Callback fired before the dialog enters.
333332
*/
334-
onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
333+
onEnter: PropTypes.func,
335334
/**
336335
* Callback fired when the dialog has entered.
337336
*/
338-
onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
337+
onEntered: PropTypes.func,
339338
/**
340339
* Callback fired when the dialog is entering.
341340
*/
342-
onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
341+
onEntering: PropTypes.func,
343342
/**
344343
* Callback fired when the escape key is pressed,
345344
* `disableKeyboard` is false and the modal is in focus.
@@ -348,15 +347,15 @@ Dialog.propTypes = {
348347
/**
349348
* Callback fired before the dialog exits.
350349
*/
351-
onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
350+
onExit: PropTypes.func,
352351
/**
353352
* Callback fired when the dialog has exited.
354353
*/
355-
onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
354+
onExited: PropTypes.func,
356355
/**
357356
* Callback fired when the dialog is exiting.
358357
*/
359-
onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` property instead.'),
358+
onExiting: PropTypes.func,
360359
/**
361360
* If `true`, the Dialog is open.
362361
*/

0 commit comments

Comments
 (0)