Skip to content

Commit 51a266d

Browse files
Revert "fix(contributors): social circles hitbox (#17)" (#19)
This reverts commit 75de039.
1 parent 75de039 commit 51a266d

File tree

2 files changed

+24
-33
lines changed

2 files changed

+24
-33
lines changed

src/components/contributors/Card.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -508,28 +508,28 @@ export const Card: ParentComponent<CardProps> = (props) => {
508508
{Object.entries(socials).map(([key, value], i) => {
509509
if (!value) return null;
510510
return (
511-
<CircularIcon
512-
size={30}
513-
element="a"
514-
href={value}
515-
target="_blank"
516-
rel="noopener noreferrer"
517-
>
518-
{key === "github" && <GithubIcon size={20} />}
519-
{key === "twitter" && <TwitterIcon size={20} />}
520-
{key === "bluesky" && <BlueskyIcon size={18} />}
521-
{key === "instagram" && <InstagramIcon size={22} />}
522-
{key === "youtube" && <YoutubeIcon size={22} />}
523-
{key === "twitch" && (
524-
<TwitchIcon size={18} class="mt-[2px] mr-[2px]" />
525-
)}
526-
{key === "kofi" && <KofiIcon size={20} />}
527-
{key === "discord" && <DiscordIcon size={20} />}
528-
{key === "tiktok" && <TiktokIcon size={20} />}
529-
{key === "printables" && <PrintablesIcon size={18} />}
530-
{key === "steam" && <SteamIcon size={18} />}
531-
{key === "matrix" && <MatrixIcon size={16} />}
532-
{key === "website" && <WebsiteIcon size={20} />}
511+
<CircularIcon size={30}>
512+
<a
513+
href={value}
514+
target="_blank"
515+
rel="noopener noreferrer"
516+
>
517+
{key === "github" && <GithubIcon size={20} />}
518+
{key === "twitter" && <TwitterIcon size={20} />}
519+
{key === "bluesky" && <BlueskyIcon size={18} />}
520+
{key === "instagram" && <InstagramIcon size={22} />}
521+
{key === "youtube" && <YoutubeIcon size={22} />}
522+
{key === "twitch" && (
523+
<TwitchIcon size={18} class="mt-[2px] mr-[2px]" />
524+
)}
525+
{key === "kofi" && <KofiIcon size={20} />}
526+
{key === "discord" && <DiscordIcon size={20} />}
527+
{key === "tiktok" && <TiktokIcon size={20} />}
528+
{key === "printables" && <PrintablesIcon size={18} />}
529+
{key === "steam" && <SteamIcon size={18} />}
530+
{key === "matrix" && <MatrixIcon size={16} />}
531+
{key === "website" && <WebsiteIcon size={20} />}
532+
</a>
533533
</CircularIcon>
534534
);
535535
})}

src/components/contributors/CircularIcon.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,18 @@ type CircularIconProps = {
44
size: number;
55
children: JSX.Element;
66
class?: string;
7-
element?: "div" | "a";
8-
href?: string;
9-
target?: string;
10-
rel?: string;
117
};
128

139
export default function CircularIcon(props: CircularIconProps) {
14-
const BaseElement = props.element || "div";
15-
1610
return (
17-
<BaseElement
11+
<div
1812
class={`bg-background-10 shadow-lg rounded-full flex items-center justify-center overflow-hidden ${props.class ? `${props.class}` : ""}`}
1913
style={{
2014
width: `${props.size}px`,
2115
height: `${props.size}px`,
2216
}}
23-
href={props.href}
24-
target={props.target}
25-
rel={props.rel}
2617
>
2718
{props.children}
28-
</BaseElement>
19+
</div>
2920
);
3021
}

0 commit comments

Comments
 (0)