import { SocialMediaPlatform } from "../../models"; import { default as LearnSocialCustom } from "../../ui-components/LearnSocialCustom"; import { DiscordIcon, FacebookIcon, GithubIcon, InstagramIcon, LinkedinIcon, TwitchIcon, TwitterIcon, YouTubeIcon, } from "../../ui-components"; import styles from "./SocialMediaButton.module.scss"; import { trackExternalLink } from "../../utils/track"; type SocialMediaButtonProps = { platform: | string | "INSTAGRAM" | "LINKEDIN" | "FACEBOOK" | "GITHUB" | "TWITTER" | "TWITCH" | "YOUTUBE" | "DISCORD" | undefined; url: string; iconAriaLabel: string; iconWidth: string; iconHeight: string; showBorder?: boolean; }; export function SocialMediaButton({ platform, url, iconAriaLabel, iconWidth, iconHeight, showBorder = true, }: SocialMediaButtonProps) { let icon = <>; switch (platform) { case SocialMediaPlatform.DISCORD: icon = ( ); break; case SocialMediaPlatform.FACEBOOK: icon = ( ); break; case SocialMediaPlatform.GITHUB: icon = ( {/* Hard coding the position of the Github icon because it's built different from the other icons */} ); break; case SocialMediaPlatform.INSTAGRAM: icon = ( ); break; case SocialMediaPlatform.LINKEDIN: icon = ( ); break; case SocialMediaPlatform.TWITCH: icon = ( ); break; case SocialMediaPlatform.TWITTER: icon = ( ); break; case SocialMediaPlatform.YOUTUBE: icon = ( ); break; default: break; } return ( { trackExternalLink(url); }} > {icon} ); }