Open rajatgalav opened 4 years ago
Instead of TransitionMotion
use Motion
component from react-motion
. something like this.
<Motion
defaultStyle={{y: -100, opacity: 0}}
style={presentStyle}
willLeave={willLeave}>
{(style) => (< NumberPopup style={
{
opacity: style.opacity,
transform: `translate(-50%, ${style.y}px)`,
WebkitTransform: `translate(-50%, ${style.y}px)`
}
} {...props}>
{children}</NumberPopup >
)}
</Motion>
I am using react-modal to create modals, and trying to slide the modal from bottom of page. For that i am trying react-motion TransitionMotion Component. My code is:
where getStyles is
getStyles = () => ({ opacity: spring(1), scale: spring(1) });
but this is not working because modal component.