mirror of
https://github.com/filecoin-project/slate.git
synced 2024-09-17 17:27:52 +03:00
fix(Previews): popup overflow
This commit is contained in:
parent
1c2104a080
commit
283b288788
@ -282,12 +282,16 @@ const useAnimateDescription = ({
|
||||
const descriptionControls = useAnimation();
|
||||
|
||||
useMounted(() => {
|
||||
const extendedDescriptionElement = extendedDescriptionRef.current;
|
||||
if (!extendedDescriptionElement) return;
|
||||
|
||||
if (isDescriptionVisible) {
|
||||
descriptionControls.start({ visibility: "initial", opacity: 1, transition: { delay: 0.2 } });
|
||||
extendedDescriptionElement.style.opacity = 1;
|
||||
descriptionControls.start({ opacity: 1, transition: { delay: 0.2 } });
|
||||
return;
|
||||
}
|
||||
|
||||
descriptionControls.set({ opacity: 0, visibility: "hidden" });
|
||||
extendedDescriptionElement.style.opacity = 0;
|
||||
}, [isDescriptionVisible]);
|
||||
|
||||
return { containerVariants, descriptionControls };
|
||||
|
@ -282,12 +282,16 @@ const useAnimateDescription = ({
|
||||
const descriptionControls = useAnimation();
|
||||
|
||||
useMounted(() => {
|
||||
const extendedDescriptionElement = extendedDescriptionRef.current;
|
||||
if (!extendedDescriptionElement) return;
|
||||
|
||||
if (isDescriptionVisible) {
|
||||
descriptionControls.start({ visibility: "initial", opacity: 1, transition: { delay: 0.2 } });
|
||||
extendedDescriptionElement.style.opacity = 1;
|
||||
descriptionControls.start({ opacity: 1, transition: { delay: 0.2 } });
|
||||
return;
|
||||
}
|
||||
|
||||
descriptionControls.set({ opacity: 0, visibility: "hidden" });
|
||||
extendedDescriptionElement.style.opacity = 0;
|
||||
}, [isDescriptionVisible]);
|
||||
|
||||
return { containerVariants, descriptionControls };
|
||||
|
Loading…
Reference in New Issue
Block a user