-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfab.js
More file actions
37 lines (35 loc) · 653 Bytes
/
Copy pathfab.js
File metadata and controls
37 lines (35 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import gsap from "gsap";
import { elasticEase } from "./constants";
export function ShowFab(fabBackground, fabTitle) {
gsap.to(fabBackground, {
duration: 1,
ease: elasticEase,
opacity: 1,
scale: 1,
y: 0,
});
gsap.to(fabTitle, {
duration: 1,
ease: elasticEase,
opacity: 1,
scale: 1,
y: 0,
delay: 0.05,
});
}
export function HideFab(fabBackground, fabTitle) {
gsap.to(fabBackground, {
duration: 0.8,
ease: elasticEase,
opacity: 0,
scale: 0.6,
y: '40%'
});
gsap.to(fabTitle, {
duration: 0.6,
ease: elasticEase,
opacity: 0,
scale: 0.8,
y: '60%'
});
}