From 6a00993481b5316caba5b7d30e63696ac5dc77b9 Mon Sep 17 00:00:00 2001 From: meriadec Date: Fri, 23 Feb 2018 10:48:21 +0100 Subject: [PATCH] Update Modal animation --- src/components/base/Modal/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/base/Modal/index.js b/src/components/base/Modal/index.js index cd4b6215..5fd54a54 100644 --- a/src/components/base/Modal/index.js +++ b/src/components/base/Modal/index.js @@ -30,7 +30,7 @@ type Props = { } const springConfig = { - stiffness: 350, + stiffness: 380, } const mapStateToProps = (state, { name, isOpened }: { name: string, isOpened?: boolean }) => ({ @@ -77,7 +77,7 @@ const Wrapper = styled(Tabbable).attrs({ mb: 100, style: p => ({ opacity: p.op, - transform: `translate3d(0, ${p.offset}px, 0)`, + transform: `scale3d(${p.scale}, ${p.scale}, ${p.scale})`, }), })` outline: none; @@ -174,7 +174,7 @@ export class Modal extends Component { onHide={onHide} motionStyle={(spring, isVisible) => ({ opacity: spring(isVisible ? 1 : 0, springConfig), - y: spring(isVisible ? 0 : 20, springConfig), + scale: spring(isVisible ? 1 : 0.95, springConfig), })} > {(m, isVisible, isAnimated) => ( @@ -188,7 +188,7 @@ export class Modal extends Component { > (this._wrapper = n)} onClick={e => e.stopPropagation()} >