diff --git a/docs/pages/api/dialog.md b/docs/pages/api/dialog.md index f9dd056316c006..d4ec93f2e8e10c 100644 --- a/docs/pages/api/dialog.md +++ b/docs/pages/api/dialog.md @@ -46,7 +46,7 @@ Dialogs are overlaid modal paper based components with a backdrop. | PaperComponent | elementType | Paper | The component used to render the body of the dialog. | | PaperProps | object | {} | Props applied to the [`Paper`](/api/paper/) element. | | scroll | 'body'
| 'paper'
| 'paper' | Determine the container for scrolling the dialog. | -| TransitionComponent | elementType | Fade | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Fade | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { enter?: number, exit?: number }
| { enter: duration.enteringScreen, exit: duration.leavingScreen } | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api/expansion-panel.md b/docs/pages/api/expansion-panel.md index af487f7e851c12..798cf1512a6e44 100644 --- a/docs/pages/api/expansion-panel.md +++ b/docs/pages/api/expansion-panel.md @@ -30,7 +30,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | disabled | bool | false | If `true`, the panel will be displayed in a disabled state. | | expanded | bool | | If `true`, expands the panel, otherwise collapse it. Setting this prop enables control over the panel. | | onChange | func | | Callback fired when the expand/collapse state is changed.

**Signature:**
`function(event: object, expanded: boolean) => void`
*event:* The event source of the callback.
*expanded:* The `expanded` state of the panel. | -| TransitionComponent | elementType | Collapse | The component used for the collapse effect. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Collapse | The component used for the collapse effect. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api/popover.md b/docs/pages/api/popover.md index 115d61da477f2a..2c53be2c93f767 100644 --- a/docs/pages/api/popover.md +++ b/docs/pages/api/popover.md @@ -45,7 +45,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | open * | bool | | If `true`, the popover is visible. | | PaperProps | { component?: element type } | {} | Props applied to the [`Paper`](/api/paper/) element. | | transformOrigin | { horizontal: number
| 'left'
| 'center'
| 'right', vertical: number
| 'top'
| 'center'
| 'bottom' }
| { vertical: 'top', horizontal: 'left',} | This is the point on the popover which will attach to the anchor's origin.
Options: vertical: [top, center, bottom, x(px)]; horizontal: [left, center, right, x(px)]. | -| TransitionComponent | elementType | Grow | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Grow | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { enter?: number, exit?: number }
| 'auto'
| 'auto' | Set to 'auto' to automatically calculate transition time based on height. | | TransitionProps | object | {} | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api/snackbar.md b/docs/pages/api/snackbar.md index d63e9874b12ea1..144faf806a0505 100644 --- a/docs/pages/api/snackbar.md +++ b/docs/pages/api/snackbar.md @@ -43,7 +43,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | onExiting | func | | Callback fired when the transition is exiting. | | open | bool | | If `true`, `Snackbar` is open. | | resumeHideDuration | number | | The number of milliseconds to wait before dismissing after user interaction. If `autoHideDuration` prop isn't specified, it does nothing. If `autoHideDuration` prop is specified but `resumeHideDuration` isn't, we default to `autoHideDuration / 2` ms. | -| TransitionComponent | elementType | Grow | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Grow | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { enter?: number, exit?: number }
| { enter: duration.enteringScreen, exit: duration.leavingScreen,} | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api/speed-dial.md b/docs/pages/api/speed-dial.md index 54e423a1bb8321..180d8ae144e2a3 100644 --- a/docs/pages/api/speed-dial.md +++ b/docs/pages/api/speed-dial.md @@ -35,7 +35,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | onOpen | func | | Callback fired when the component requests to be open.

**Signature:**
`function(event: object, reason: string) => void`
*event:* The event source of the callback.
*reason:* Can be: `"toggle"`, `"focus"`, `"mouseEnter"`. | | open * | bool | | If `true`, the SpeedDial is open. | | openIcon | node | | The icon to display in the SpeedDial Fab when the SpeedDial is open. | -| TransitionComponent | elementType | Zoom | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Zoom | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { appear?: number, enter?: number, exit?: number }
| { enter: duration.enteringScreen, exit: duration.leavingScreen,} | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api/step-content.md b/docs/pages/api/step-content.md index c6fde6c1ff3a6d..b67e73d894fe8f 100644 --- a/docs/pages/api/step-content.md +++ b/docs/pages/api/step-content.md @@ -26,7 +26,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi |:-----|:-----|:--------|:------------| | children | node | | Step content. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | -| TransitionComponent | elementType | Collapse | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Collapse | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { enter?: number, exit?: number }
| 'auto'
| 'auto' | Adjust the duration of the content expand transition. Passed as a prop to the transition component.
Set to 'auto' to automatically calculate transition time based on height. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api/tooltip.md b/docs/pages/api/tooltip.md index 674a3f6ed381b2..7b812201c194f8 100644 --- a/docs/pages/api/tooltip.md +++ b/docs/pages/api/tooltip.md @@ -42,7 +42,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | placement | 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top'
| 'bottom' | Tooltip placement. | | PopperProps | object | | Props applied to the [`Popper`](/api/popper/) element. | | title * | node | | Tooltip title. Zero-length titles string are never displayed. | -| TransitionComponent | elementType | Grow | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Grow | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api/tree-item.md b/docs/pages/api/tree-item.md index 466d18d2d97f9c..057d772047780f 100644 --- a/docs/pages/api/tree-item.md +++ b/docs/pages/api/tree-item.md @@ -32,7 +32,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | icon | node | | The icon to display next to the tree node's label. | | label | node | | The tree node label. | | nodeId * | string | | The id of the node. | -| TransitionComponent | elementType | Collapse | The component used for the transition. [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | +| TransitionComponent | elementType | Collapse | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | The `ref` is forwarded to the root element. diff --git a/docs/src/pages/components/transitions/transitions.md b/docs/src/pages/components/transitions/transitions.md index d00139fdf84214..f1033e8f89323d 100644 --- a/docs/src/pages/components/transitions/transitions.md +++ b/docs/src/pages/components/transitions/transitions.md @@ -80,9 +80,11 @@ This example also demonstrates how to delay the enter transition. ## TransitionComponent prop -A few of the Material-UI components accept a `TransitionComponent` prop to customize the transition. You can use any of the above components or a home-made one. +The components accept a `TransitionComponent` prop to customize the default transitions. +You can use any of the above components or your own. It should respect the following conditions: -Accepts an `in` prop. This corresponds to the open / close state. -Call the `onEnter` callback prop when the enter transition starts. -Call the `onExited` callback prop when the exit transition is completed. + +- Accepts an `in` prop. This corresponds to the open/close state. +- Call the `onEnter` callback prop when the enter transition starts. +- Call the `onExited` callback prop when the exit transition is completed. These two callbacks allow to unmount the children when in a closed state and fully transitioned. diff --git a/packages/material-ui-lab/src/SpeedDial/SpeedDial.d.ts b/packages/material-ui-lab/src/SpeedDial/SpeedDial.d.ts index 7b66476d30c329..4337f1a3c00cca 100644 --- a/packages/material-ui-lab/src/SpeedDial/SpeedDial.d.ts +++ b/packages/material-ui-lab/src/SpeedDial/SpeedDial.d.ts @@ -63,7 +63,7 @@ export interface SpeedDialProps openIcon?: React.ReactNode; /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent?: React.ComponentType; /** diff --git a/packages/material-ui-lab/src/SpeedDial/SpeedDial.js b/packages/material-ui-lab/src/SpeedDial/SpeedDial.js index 24643a1456ce8e..1323253e1d8a9d 100644 --- a/packages/material-ui-lab/src/SpeedDial/SpeedDial.js +++ b/packages/material-ui-lab/src/SpeedDial/SpeedDial.js @@ -438,7 +438,7 @@ SpeedDial.propTypes = { openIcon: PropTypes.node, /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui-lab/src/TreeItem/TreeItem.d.ts b/packages/material-ui-lab/src/TreeItem/TreeItem.d.ts index bfdb57e9850112..6572e7026b5d7e 100644 --- a/packages/material-ui-lab/src/TreeItem/TreeItem.d.ts +++ b/packages/material-ui-lab/src/TreeItem/TreeItem.d.ts @@ -30,7 +30,7 @@ export interface TreeItemProps nodeId: string; /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent?: React.ComponentType; } diff --git a/packages/material-ui-lab/src/TreeItem/TreeItem.js b/packages/material-ui-lab/src/TreeItem/TreeItem.js index a11cde445d21bd..d1dc0066edf10b 100644 --- a/packages/material-ui-lab/src/TreeItem/TreeItem.js +++ b/packages/material-ui-lab/src/TreeItem/TreeItem.js @@ -362,7 +362,7 @@ TreeItem.propTypes = { onKeyDown: PropTypes.func, /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, }; diff --git a/packages/material-ui/src/Dialog/Dialog.js b/packages/material-ui/src/Dialog/Dialog.js index 3c37ed60582580..4a0919f26baef9 100644 --- a/packages/material-ui/src/Dialog/Dialog.js +++ b/packages/material-ui/src/Dialog/Dialog.js @@ -371,7 +371,7 @@ Dialog.propTypes = { scroll: PropTypes.oneOf(['body', 'paper']), /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui/src/ExpansionPanel/ExpansionPanel.js b/packages/material-ui/src/ExpansionPanel/ExpansionPanel.js index ac0a3b540e31d8..ad3f8436faaf13 100644 --- a/packages/material-ui/src/ExpansionPanel/ExpansionPanel.js +++ b/packages/material-ui/src/ExpansionPanel/ExpansionPanel.js @@ -202,7 +202,7 @@ ExpansionPanel.propTypes = { square: PropTypes.bool, /** * The component used for the collapse effect. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui/src/Popover/Popover.js b/packages/material-ui/src/Popover/Popover.js index 0373db9110d4d4..43d4bf16583e41 100644 --- a/packages/material-ui/src/Popover/Popover.js +++ b/packages/material-ui/src/Popover/Popover.js @@ -593,7 +593,7 @@ Popover.propTypes = { }), /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui/src/Snackbar/Snackbar.js b/packages/material-ui/src/Snackbar/Snackbar.js index deb0283854e79c..4945900385ff43 100644 --- a/packages/material-ui/src/Snackbar/Snackbar.js +++ b/packages/material-ui/src/Snackbar/Snackbar.js @@ -362,7 +362,7 @@ Snackbar.propTypes = { resumeHideDuration: PropTypes.number, /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui/src/StepContent/StepContent.js b/packages/material-ui/src/StepContent/StepContent.js index 1b02e9e9ae4899..7a43a18269b21c 100644 --- a/packages/material-ui/src/StepContent/StepContent.js +++ b/packages/material-ui/src/StepContent/StepContent.js @@ -112,7 +112,7 @@ StepContent.propTypes = { orientation: PropTypes.oneOf(['horizontal', 'vertical']), /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/material-ui/src/Tooltip/Tooltip.js b/packages/material-ui/src/Tooltip/Tooltip.js index e9250abb8e149d..9a84a34632c91e 100644 --- a/packages/material-ui/src/Tooltip/Tooltip.js +++ b/packages/material-ui/src/Tooltip/Tooltip.js @@ -629,7 +629,7 @@ Tooltip.propTypes = { title: PropTypes.node.isRequired, /** * The component used for the transition. - * [Follow our guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. + * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. */ TransitionComponent: PropTypes.elementType, /**