From dc6764e3871dc8f8820a60e8c57c3902c373ecb4 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Sat, 13 Mar 2021 12:29:57 -0500 Subject: [PATCH] DetailsPanel: smooth panel transitions to eliminate bounce --- src/components/IconGrid/DetailsPanel.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/IconGrid/DetailsPanel.tsx b/src/components/IconGrid/DetailsPanel.tsx index 16ea647..766fc0c 100644 --- a/src/components/IconGrid/DetailsPanel.tsx +++ b/src/components/IconGrid/DetailsPanel.tsx @@ -22,20 +22,20 @@ const panelVariants = { height: "100%", marginTop: "4px", marginBottom: "4px", - // transition: { stiffness: 600, damping: 32, duration: 0.2 }, + transition: { type: "tween", duration: 0.1 }, }, collapsed: { opacity: 0, height: "0px", marginTop: "0px", marginBottom: "0px", - // transition: { stiffness: 600, damping: 32, duration: 0.2 }, + transition: { type: "tween", duration: 0.1 }, }, }; const contentVariants = { - open: { opacity: 1, transition: { duration: 0.2 } }, - collapsed: { opacity: 0, transition: { duration: 0.1 } }, + open: { opacity: 1, transition: { duration: 0.2, delay: 0.1 } }, + collapsed: { opacity: 0, transition: { duration: 0 } }, }; const buttonColor = "#35313D";