From 04abf86d1a6d451945f3819c070a800dd4a05ba4 Mon Sep 17 00:00:00 2001 From: 0tuedon <90271995+0tuedon@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:52:05 +0100 Subject: [PATCH] patch: add linkedin icon --- src/components/footer/Footer.stories.tsx | 8 +++++++ src/components/footer/FooterSocials.tsx | 30 +++++++++++++++++++----- src/icons.ts | 1 + src/icons/LinkedinIcon.tsx | 28 ++++++++++++++++++++++ 4 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 src/icons/LinkedinIcon.tsx diff --git a/src/components/footer/Footer.stories.tsx b/src/components/footer/Footer.stories.tsx index 6926dc4..6d2b8d0 100644 --- a/src/components/footer/Footer.stories.tsx +++ b/src/components/footer/Footer.stories.tsx @@ -43,6 +43,14 @@ export const UnModifiedFooter = (args: { colorMode: "light" | "dark" }) => { className: "hover:text-orange-400", }, }, + { + entity: "linkedin", + entityLink: + "https://www.linkedin.com/company/bitcoin-dev-project/", + iconProps: { + className: "hover:text-orange-400", + }, + }, { entity: "nostr", entityLink: "https://discord.gg/bitcoindevs", diff --git a/src/components/footer/FooterSocials.tsx b/src/components/footer/FooterSocials.tsx index 1b417b5..34a7a34 100644 --- a/src/components/footer/FooterSocials.tsx +++ b/src/components/footer/FooterSocials.tsx @@ -1,22 +1,32 @@ import React from "react"; import { FooterPartsPrimitiveProps } from "./types"; -import { TwitterXIcon, GithubIcon, DiscordIcon, NostrIcon } from "../../icons"; +import { + TwitterXIcon, + GithubIcon, + DiscordIcon, + NostrIcon, + LinkedinIcon, +} from "../../icons"; import { twMerge } from "tailwind-merge"; import clsx from "clsx"; +type SupportedSocialMedia = + | "twitter" + | "github" + | "discord" + | "nostr" + | "linkedin"; -type SupportedSocialMedia = "twitter" | "github" | "discord" | "nostr"; - -type ManadatorySocialMediaProps = { +type MandatorySocialMediaProps = { entityLink: string; iconProps?: React.SVGProps; } & T; type SocialMediaProps = - | ManadatorySocialMediaProps<{ + | MandatorySocialMediaProps<{ entity: SupportedSocialMedia; icon?: React.ReactElement; }> - | ManadatorySocialMediaProps<{ + | MandatorySocialMediaProps<{ entity: Exclude; icon: React.ReactElement; }>; @@ -56,6 +66,14 @@ const Platform = ({ platform }: { platform: SocialMediaProps }) => { ); } + if (entity === "linkedin") { + return ( + + ); + } }; const iconElement = getIcon(entity); diff --git a/src/icons.ts b/src/icons.ts index 71a4a30..b43e49d 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -17,6 +17,7 @@ export { default as FilterIcon } from "./icons/FilterIcon"; export { default as FilterCloseIcon } from "./icons/FilterCloseIcon"; export { default as GithubIcon } from "./icons/GithubIcon"; export { default as LightningIconSolid } from "./icons/LightningIconSolid"; +export { default as LinkedinIcon } from "./icons/LinkedinIcon"; export { default as MicIcon } from "./icons/MicIcon"; export { default as NightIcon } from "./icons/NightIcon"; export { default as NostrIcon } from "./icons/NostrIcon"; diff --git a/src/icons/LinkedinIcon.tsx b/src/icons/LinkedinIcon.tsx new file mode 100644 index 0000000..16b2348 --- /dev/null +++ b/src/icons/LinkedinIcon.tsx @@ -0,0 +1,28 @@ +import * as React from "react"; +import { SVGProps } from "react"; + +const LinkedinIcon = ({ + width = 52, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( + // height is destructed and unused, scaling is defined by width + + + + + +); + +export default LinkedinIcon;