Skip to content

Commit e5295b1

Browse files
committed
Fix social links icons
1 parent f7190ba commit e5295b1

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

components/SocialLinks.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ const SocialLinks: React.FC<{}> = () => {
1818
>
1919
<Button
2020
onClick={() => window.open(s.value)}
21-
className="group border-transparent group-hover:border-indigo-500 h-16 w-16 transition-colors duration-200 relative overflow-hidden bg-slide mr-2"
21+
className="group border-transparent group-hover:border-indigo-500 transition-colors duration-200 relative overflow-hidden bg-slide"
2222
sx={{
23-
borderRadius: "999px",
23+
width: "4rem",
24+
height: "4rem",
25+
borderRadius: "50%",
26+
mr: "8px",
2427
}}
2528
>
26-
<SocialIcon id={s.id} className="fill-indigo-500 w-10 h-10" />
29+
<SocialIcon id={s.id} size="large" className="fill-indigo-500" />
2730
</Button>
2831
</Tooltip>
2932
))}

components/icons/index.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ export const SOCIAL_ICONS = {
5555

5656
export type SocialIconId = keyof typeof SOCIAL_ICONS;
5757

58-
export const SocialIcon: React.FC<{ id: string; className?: string }> = ({
59-
id,
60-
className,
61-
}) => {
58+
export const SocialIcon: React.FC<{
59+
id: string;
60+
className?: string;
61+
size?: "small" | "medium" | "large";
62+
}> = ({ id, className, size }) => {
6263
if (!id) throw new Error("ContactId is required");
6364
let Icon = SOCIAL_ICONS[id as SocialIconId];
6465
if (!Icon) throw new Error(`'${id}' doesn't have any icon`);
65-
return <Icon className={className} color="primary" />;
66+
return <Icon className={className} fontSize={size} color="primary" />;
6667
};
6768
export const DEV_TOOLS: {
6869
[key: string]: (props: SVGProps<SVGSVGElement>) => JSX.Element;

0 commit comments

Comments
 (0)