1
1
import React from 'react' ;
2
+ import { motion } from 'framer-motion' ;
2
3
3
4
import PageHero from '../layout/PageHero' ;
4
5
import { ABOUT_IMG_URL } from '../utils/constants' ;
5
6
6
7
7
8
const About = ( ) => {
9
+
10
+ const underlineAnimate = {
11
+ hidden : {
12
+ opacity : 0 ,
13
+ pathLength : 0 ,
14
+ } ,
15
+ visible : {
16
+ opacity : 1 ,
17
+ pathLength : 1 ,
18
+ transition : {
19
+ delay : 1 ,
20
+ duration : .8 ,
21
+ } ,
22
+ } ,
23
+ } ;
24
+
8
25
return (
9
26
< main >
10
27
< PageHero title = "about" />
@@ -15,7 +32,11 @@ const About = () => {
15
32
< img src = { ABOUT_IMG_URL } alt = "" />
16
33
</ div >
17
34
< div >
18
- < h2 className = 'text-4xl lg:text-6xl font-bold capitalize tracking-wider' >
35
+ < motion . h2 className = 'text-4xl lg:text-6xl font-bold capitalize tracking-wider'
36
+ initial = { { opacity : 0 , y : 60 } }
37
+ animate = { { opacity : 1 , y : 0 } }
38
+ transition = { { duration : .5 } }
39
+ >
19
40
Our Story
20
41
< svg
21
42
className = "svg-underline stroke-[#ffb81c] relative z-10 w-1/2"
@@ -26,12 +47,19 @@ const About = () => {
26
47
fill = "none"
27
48
xmlns = "http://www.w3.org/2000/svg"
28
49
>
29
- < path
50
+ < motion . path
30
51
d = "M3 9C118.957 4.47226 364.497 -1.86658 419 9"
52
+ variants = { underlineAnimate }
53
+ initial = "hidden"
54
+ animate = "visible"
31
55
/>
32
56
</ svg >
33
- </ h2 >
34
- < p className = 'leading-10 text-gray-600 py-8 text-lg' >
57
+ </ motion . h2 >
58
+ < motion . p className = 'leading-10 text-gray-600 py-8 text-lg'
59
+ initial = { { opacity : 0 , y : 60 } }
60
+ animate = { { opacity : 1 , y : 0 } }
61
+ transition = { { delay : .5 , duration : .8 } }
62
+ >
35
63
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Fugiat
36
64
accusantium sapiente tempora sed dolore esse deserunt eaque
37
65
excepturi, delectus error accusamus vel eligendi, omnis beatae.
@@ -42,7 +70,7 @@ const About = () => {
42
70
ex, eaque perspiciatis nisi, eum totam velit saepe sed quos
43
71
similique amet. Ex, voluptate accusamus nesciunt totam vitae esse
44
72
iste.
45
- </ p >
73
+ </ motion . p >
46
74
</ div >
47
75
</ div >
48
76
</ div >
0 commit comments