Skip to content

Commit d6f1fe3

Browse files
committed
create social links component
1 parent 782b84c commit d6f1fe3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/components/SocialLinks.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2+
import { Link } from 'react-router-dom';
3+
import { twJoin } from 'tailwind-merge';
4+
5+
import { SocialLink, socialLinks } from '../data/Social';
6+
7+
const SocialLinks = ({ inverted }: { inverted?: boolean }) => {
8+
return (
9+
<div className="flex items-center gap-4">
10+
{socialLinks.map((link: SocialLink) => (
11+
<Link to={link.url} key={link.id}>
12+
<FontAwesomeIcon
13+
icon={link.icon}
14+
className={twJoin(
15+
'h-8 w-8',
16+
inverted ? 'text-white' : 'text-dark-900',
17+
'shadow-sm transition-transform duration-300 ease-linear hover:-translate-y-1 hover:text-blue-600 dark:text-white dark:hover:text-blue-400',
18+
)}
19+
/>
20+
</Link>
21+
))}
22+
</div>
23+
);
24+
};
25+
26+
export default SocialLinks;

0 commit comments

Comments
 (0)