Skip to content

Commit 8f51e51

Browse files
authored
Merge pull request #10816 from MahendraBishnoi29/browny_dev
added hover animation in footer social icons
2 parents 71538fc + c2ff36a commit 8f51e51

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/components/Footer.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {
99
useToken,
1010
} from "@chakra-ui/react"
1111
import { graphql, useStaticQuery } from "gatsby"
12-
import React from "react"
13-
import { FaGithub, FaTwitter, FaYoutube, FaDiscord } from "react-icons/fa"
1412
import { useI18next, useTranslation } from "gatsby-plugin-react-i18next"
13+
import React from "react"
14+
import { FaDiscord, FaGithub, FaTwitter, FaYoutube } from "react-icons/fa"
1515

1616
import { Lang } from "../utils/languages"
1717
import { getLocaleTimestamp } from "../utils/time"
@@ -24,24 +24,27 @@ const socialLinks = [
2424
icon: FaGithub,
2525
to: "https://github.com/ethereum/ethereum-org-website",
2626
ariaLabel: "GitHub",
27+
color: "#333",
2728
},
2829
{
2930
icon: FaTwitter,
3031
to: "https://twitter.com/ethdotorg",
3132
ariaLabel: "Twitter",
33+
color: "#1DA1F2",
3234
},
3335
{
3436
icon: FaYoutube,
3537
to: "https://youtube.com/channel/UCNOfzGXD_C9YMYmnefmPH0g",
3638
ariaLabel: "Youtube",
39+
color: "#FF0000",
3740
},
3841
{
3942
icon: FaDiscord,
4043
to: "https://discord.gg/CetY6Y4",
4144
ariaLabel: "Discord",
45+
color: "#7289da",
4246
},
4347
]
44-
4548
export interface LinkSection {
4649
title: TranslationKey
4750
links: Array<{
@@ -324,7 +327,16 @@ const Footer: React.FC<IProps> = () => {
324327
color="secondary"
325328
aria-label={link.ariaLabel}
326329
>
327-
<Icon as={link.icon} fontSize="4xl" ml={4} />
330+
<Icon
331+
as={link.icon}
332+
_hover={{
333+
color: link.color,
334+
transition:
335+
"color 0.2s ease-in-out, transform 0.2s ease-in-out",
336+
}}
337+
fontSize="4xl"
338+
ml={4}
339+
/>
328340
</Link>
329341
)
330342
})}

0 commit comments

Comments
 (0)