Browse Source

🔧 Updated SocialsList1 component

🚀 Added icons and links
🎨 Improved styling
🐛 Fixed a bug in SocialsList1
 Ready for social sharing!
main
John Doe 1 year ago
parent
commit
26e4c4ece4
  1. 36
      src/shared/SocialsList1.tsx

36
src/shared/SocialsList1.tsx

@ -0,0 +1,36 @@
import { SocialType } from "@/shared/SocialsShare";
import React, { FC } from "react";
export interface SocialsList1Props {
className?: string;
}
const socials: SocialType[] = [
{ name: "Facebook", icon: "lab la-facebook-square", href: "#" },
{ name: "Twitter", icon: "lab la-twitter", href: "#" },
{ name: "Youtube", icon: "lab la-youtube", href: "#" },
{ name: "Instagram", icon: "lab la-instagram", href: "#" },
];
const SocialsList1: FC<SocialsList1Props> = ({ className = "space-y-2.5" }) => {
const renderItem = (item: SocialType, index: number) => {
return (
<a
href={item.href}
className="flex items-center text-2xl text-neutral-700 hover:text-black dark:text-neutral-300 dark:hover:text-white leading-none space-x-2 group"
key={index}
>
<i className={item.icon}></i>
<span className="hidden lg:block text-sm">{item.name}</span>
</a>
);
};
return (
<div className={`nc-SocialsList1 ${className}`} data-nc-id="SocialsList1">
{socials.map(renderItem)}
</div>
);
};
export default SocialsList1;
Loading…
Cancel
Save