mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 07:43:10 +10:00
25 lines
551 B
TypeScript
25 lines
551 B
TypeScript
import { forwardRef } from "react";
|
|
|
|
type BrandIconProps = {
|
|
slug: string;
|
|
};
|
|
|
|
export const BrandIcon = forwardRef<HTMLImageElement, BrandIconProps>(({ slug }, ref) => {
|
|
if (slug.toLowerCase() === "linkedin") {
|
|
return (
|
|
<img
|
|
ref={ref}
|
|
alt="LinkedIn"
|
|
className="size-4"
|
|
src={`${window.location.origin}/support-logos/linkedin.svg`}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<img ref={ref} alt={slug} className="size-4" src={`https://cdn.simpleicons.org/${slug}`} />
|
|
);
|
|
});
|
|
|
|
BrandIcon.displayName = "BrandIcon";
|