You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

  1. import { SocialType } from "@/shared/SocialsShare";
  2. import React, { FC } from "react";
  3. export interface SocialsListProps {
  4. className?: string;
  5. itemClass?: string;
  6. socials?: SocialType[];
  7. }
  8. const socialsDemo: SocialType[] = [
  9. { name: "Facebook", icon: "lab la-facebook-square", href: "#" },
  10. { name: "Twitter", icon: "lab la-twitter", href: "#" },
  11. { name: "Youtube", icon: "lab la-youtube", href: "#" },
  12. { name: "Instagram", icon: "lab la-instagram", href: "#" },
  13. ];
  14. const SocialsList: FC<SocialsListProps> = ({
  15. className = "",
  16. itemClass = "block",
  17. socials = socialsDemo,
  18. }) => {
  19. return (
  20. <nav
  21. className={`nc-SocialsList flex space-x-2.5 text-2xl text-neutral-6000 dark:text-neutral-300 ${className}`}
  22. data-nc-id="SocialsList"
  23. >
  24. {socials.map((item, i) => (
  25. <a
  26. key={i}
  27. className={`${itemClass}`}
  28. href={item.href}
  29. target="_blank"
  30. rel="noopener noreferrer"
  31. title={item.name}
  32. >
  33. <i className={item.icon}></i>
  34. </a>
  35. ))}
  36. </nav>
  37. );
  38. };
  39. export default SocialsList;