Closed
Description
Cannot use Dialog in a storybook because ReactDOM.createPortal fails and after I mock ReactDOM.createPortal, Fade.js throws errors
- This is a v1.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Should be able to snapshot test the Dialog
Current Behavior
I have an npm library where I am using @material-ui/core/Dialog. This library has storybooks enabled.
First issue: realized that I have to mock ReactDOM.createPortal:
ReactDom.createPortal = (node) => node;
Second issue: Then struggled for a few hours to understand what is the problem in Fade.js and got stuck at:
Error: TypeError: Cannot set property 'webkitTransition' of undefined
at:
handleExit = node => {
.....
node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);
node.style.transition = theme.transitions.create('opacity', transitionProps);
I just cannot pass over this issue anymore and I don't think I will be the only one having it.
Thanks