aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/animations/slide_animation.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2019-01-03 02:07:02 +0800
committerfragosti <francesco.agosti93@gmail.com>2019-01-03 02:07:02 +0800
commit1ceb3c96645fd3682c59459fdce996cdf5f216cf (patch)
treed7c656316045dd2da21a8512d0a3c569ec935bba /packages/instant/src/components/animations/slide_animation.tsx
parent4252a760f072da907d1b542e3bb9917db3f22b07 (diff)
downloaddexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar.gz
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar.bz2
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar.lz
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar.xz
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.tar.zst
dexon-sol-tools-1ceb3c96645fd3682c59459fdce996cdf5f216cf.zip
feat: unmount the token selector when its not displaying
Diffstat (limited to 'packages/instant/src/components/animations/slide_animation.tsx')
-rw-r--r--packages/instant/src/components/animations/slide_animation.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/instant/src/components/animations/slide_animation.tsx b/packages/instant/src/components/animations/slide_animation.tsx
index dc42e168d..6ac47e9a6 100644
--- a/packages/instant/src/components/animations/slide_animation.tsx
+++ b/packages/instant/src/components/animations/slide_animation.tsx
@@ -11,6 +11,7 @@ export interface SlideAnimationProps {
slideOutSettings: OptionallyScreenSpecific<PositionAnimationSettings>;
zIndex?: OptionallyScreenSpecific<number>;
height?: string;
+ onAnimationEnd?: () => void;
}
export const SlideAnimation: React.StatelessComponent<SlideAnimationProps> = props => {
@@ -19,7 +20,12 @@ export const SlideAnimation: React.StatelessComponent<SlideAnimationProps> = pro
}
const positionSettings = props.animationState === 'slidIn' ? props.slideInSettings : props.slideOutSettings;
return (
- <PositionAnimation height={props.height} positionSettings={positionSettings} zIndex={props.zIndex}>
+ <PositionAnimation
+ onAnimationEnd={props.onAnimationEnd}
+ height={props.height}
+ positionSettings={positionSettings}
+ zIndex={props.zIndex}
+ >
{props.children}
</PositionAnimation>
);