Skip to content

Commit 174269f

Browse files
committed
feat: add animation for the arrow icon in section1
1 parent 69ec169 commit 174269f

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

src/components/HomePageComponents/Section1.tsx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ArrowCircleDownIcon from "@mui/icons-material/ArrowCircleDown";
12
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
23
import SearchIcon from "@mui/icons-material/Search";
34
import {
@@ -181,7 +182,38 @@ const Section1: React.FC<Section1Props> = ({ scrollToNext }) => {
181182
}}
182183
>
183184
<IconButton onClick={scrollToNext}>
184-
<ExpandMoreIcon sx={{ fontSize: 40, color: Colors.lightGray }} />
185+
{/* <ExpandMoreIcon sx={{ fontSize: 40, color: Colors.lightGray }} /> */}
186+
{/* <ArrowCircleDownIcon
187+
sx={{
188+
fontSize: 40,
189+
color: Colors.lightGray,
190+
animation: "bounce 1.5s infinite",
191+
"@keyframes bounce": {
192+
"0%, 100%": {
193+
transform: "translateY(0)",
194+
},
195+
"50%": {
196+
transform: "translateY(8px)",
197+
},
198+
},
199+
}}
200+
/> */}
201+
<ArrowCircleDownIcon
202+
sx={{
203+
fontSize: 40,
204+
color: Colors.lightGray,
205+
animation: "flipY 5s infinite",
206+
"@keyframes flipY": {
207+
"0%, 100%": {
208+
transform: "rotateY(0deg)",
209+
},
210+
"50%": {
211+
transform: "rotateY(180deg)",
212+
},
213+
},
214+
transformOrigin: "center",
215+
}}
216+
/>
185217
</IconButton>
186218
</Box>
187219
</Box>

src/components/HomePageComponents/Section2.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ArrowCircleDownIcon from "@mui/icons-material/ArrowCircleDown";
12
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
23
import { Typography, Box, Button, IconButton } from "@mui/material";
34
import { Colors } from "design/theme";
@@ -177,7 +178,9 @@ const Section2: React.FC<Section2Props> = ({
177178
}}
178179
>
179180
<IconButton onClick={scrollToNext}>
180-
<ExpandMoreIcon sx={{ fontSize: 40, color: Colors.darkPurple }} />
181+
<ArrowCircleDownIcon
182+
sx={{ fontSize: 40, color: Colors.darkPurple }}
183+
/>
181184
</IconButton>
182185
</Box>
183186
</Box>

src/components/HomePageComponents/Section3.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ArrowCircleDownIcon from "@mui/icons-material/ArrowCircleDown";
12
import CloseIcon from "@mui/icons-material/Close";
23
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
34
import { Typography, Box, IconButton, Dialog } from "@mui/material";
@@ -141,7 +142,7 @@ const Section3: React.FC<Section3Props> = ({ scrollToNext }) => {
141142
}}
142143
>
143144
<IconButton onClick={scrollToNext}>
144-
<ExpandMoreIcon sx={{ fontSize: 40, color: Colors.lightGray }} />
145+
<ArrowCircleDownIcon sx={{ fontSize: 40, color: Colors.lightGray }} />
145146
</IconButton>
146147
</Box>
147148
</Box>

0 commit comments

Comments
 (0)