diff --git a/packages/material-ui/src/Fade/Fade.js b/packages/material-ui/src/Fade/Fade.js index 576153dbcc5e76..37654f391d9bf2 100644 --- a/packages/material-ui/src/Fade/Fade.js +++ b/packages/material-ui/src/Fade/Fade.js @@ -61,7 +61,7 @@ class Fade extends React.Component { const style = { ...styleProp, - ...(React.isValidElement(children) ? children.props.style : {}), + ...children.props.style, }; return ( @@ -87,7 +87,7 @@ Fade.propTypes = { /** * A single child content element. */ - children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + children: PropTypes.element.isRequired, /** * If `true`, the component will transition in. */ diff --git a/pages/api/fade.md b/pages/api/fade.md index f3f8cf2be18d49..400657f8bf7441 100644 --- a/pages/api/fade.md +++ b/pages/api/fade.md @@ -21,7 +21,7 @@ The `hidden` prop will be set on the child according to the `in` prop. | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children | union: element |
 func
|   | A single child content element. | +| children * | element |   | A single child content element. | | in | bool |   | If `true`, the component will transition in. | | timeout | union: 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. |