This updates the Modal and Overlay components to exit more consistently according to their transitions. Previously the Modal would unmount as soon as it's dialog transition exited, even if the backdrop one had not finished. Originally i tried to exit when both were done, but actually that doesn't seem like the right behavior, bc you want each component to unmount as soon as it can.
This also simplifies the logic a bit because we can leave the unmounting up to the consumer if they want to disregard our props. I also was able to remove the !hasTransition cases by using NoopTransition.
This updates the Modal and Overlay components to exit more consistently according to their transitions. Previously the
Modal
would unmount as soon as it's dialog transition exited, even if the backdrop one had not finished. Originally i tried to exit when both were done, but actually that doesn't seem like the right behavior, bc you want each component to unmount as soon as it can.This also simplifies the logic a bit because we can leave the unmounting up to the consumer if they want to disregard our props. I also was able to remove the
!hasTransition
cases by usingNoopTransition
.