-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.tsx
More file actions
31 lines (26 loc) · 864 Bytes
/
Copy pathtemplate.tsx
File metadata and controls
31 lines (26 loc) · 864 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
'use client';
import { gsap, useGSAP } from '@/lib/gsap-setup';
export default function Template({ children }: { children: React.ReactNode }) {
useGSAP(() => {
const tl = gsap.timeline();
tl.to('.page-transition--inner', {
yPercent: 0,
duration: 0.2,
})
.to('.page-transition--inner', {
yPercent: -100,
duration: 0.2,
})
.to('.page-transition', {
yPercent: -100,
});
});
return (
<div>
<div className="page-transition w-screen h-screen fixed top-0 left-0 bg-background-light z-[5]">
<div className="page-transition--inner w-screen h-screen fixed top-0 left-0 bg-primary z-[5] translate-y-full"></div>
</div>
{children}
</div>
);
}