Skip to content

Commit 6a68640

Browse files
authored
Merge pull request #40 from bitcoin-dev-project/patch/add-linkedin-icon
Patch: Add linkedin icon
2 parents e2951b6 + 04abf86 commit 6a68640

File tree

4 files changed

+61
-6
lines changed

4 files changed

+61
-6
lines changed

src/components/footer/Footer.stories.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ export const UnModifiedFooter = (args: { colorMode: "light" | "dark" }) => {
4343
className: "hover:text-orange-400",
4444
},
4545
},
46+
{
47+
entity: "linkedin",
48+
entityLink:
49+
"https://www.linkedin.com/company/bitcoin-dev-project/",
50+
iconProps: {
51+
className: "hover:text-orange-400",
52+
},
53+
},
4654
{
4755
entity: "nostr",
4856
entityLink: "https://discord.gg/bitcoindevs",

src/components/footer/FooterSocials.tsx

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
import React from "react";
22
import { FooterPartsPrimitiveProps } from "./types";
3-
import { TwitterXIcon, GithubIcon, DiscordIcon, NostrIcon } from "../../icons";
3+
import {
4+
TwitterXIcon,
5+
GithubIcon,
6+
DiscordIcon,
7+
NostrIcon,
8+
LinkedinIcon,
9+
} from "../../icons";
410
import { twMerge } from "tailwind-merge";
511
import clsx from "clsx";
12+
type SupportedSocialMedia =
13+
| "twitter"
14+
| "github"
15+
| "discord"
16+
| "nostr"
17+
| "linkedin";
618

7-
type SupportedSocialMedia = "twitter" | "github" | "discord" | "nostr";
8-
9-
type ManadatorySocialMediaProps<T> = {
19+
type MandatorySocialMediaProps<T> = {
1020
entityLink: string;
1121
iconProps?: React.SVGProps<SVGSVGElement>;
1222
} & T;
1323

1424
type SocialMediaProps =
15-
| ManadatorySocialMediaProps<{
25+
| MandatorySocialMediaProps<{
1626
entity: SupportedSocialMedia;
1727
icon?: React.ReactElement;
1828
}>
19-
| ManadatorySocialMediaProps<{
29+
| MandatorySocialMediaProps<{
2030
entity: Exclude<string, SupportedSocialMedia>;
2131
icon: React.ReactElement;
2232
}>;
@@ -56,6 +66,14 @@ const Platform = ({ platform }: { platform: SocialMediaProps }) => {
5666
<NostrIcon className={twMerge(clsx("w-full", className))} {...rest} />
5767
);
5868
}
69+
if (entity === "linkedin") {
70+
return (
71+
<LinkedinIcon
72+
className={twMerge(clsx("w-full", className))}
73+
{...rest}
74+
/>
75+
);
76+
}
5977
};
6078
const iconElement = getIcon(entity);
6179

src/icons.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export { default as FilterIcon } from "./icons/FilterIcon";
1717
export { default as FilterCloseIcon } from "./icons/FilterCloseIcon";
1818
export { default as GithubIcon } from "./icons/GithubIcon";
1919
export { default as LightningIconSolid } from "./icons/LightningIconSolid";
20+
export { default as LinkedinIcon } from "./icons/LinkedinIcon";
2021
export { default as MicIcon } from "./icons/MicIcon";
2122
export { default as NightIcon } from "./icons/NightIcon";
2223
export { default as NostrIcon } from "./icons/NostrIcon";

src/icons/LinkedinIcon.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as React from "react";
2+
import { SVGProps } from "react";
3+
4+
const LinkedinIcon = ({
5+
width = 52,
6+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
7+
height,
8+
...props
9+
}: SVGProps<SVGSVGElement>) => (
10+
// height is destructed and unused, scaling is defined by width
11+
<svg
12+
xmlns="http://www.w3.org/2000/svg"
13+
width={width}
14+
viewBox="0 0 24 24"
15+
fill="none"
16+
stroke="currentColor"
17+
strokeWidth={2}
18+
strokeLinecap="round"
19+
strokeLinejoin="round"
20+
{...props}
21+
>
22+
<path d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6z" />
23+
<rect x={2} y={9} width={4} height={12} />
24+
<circle cx={4} cy={4} r={2} />
25+
</svg>
26+
);
27+
28+
export default LinkedinIcon;

0 commit comments

Comments
 (0)