81 lines
1.7 KiB
TypeScript
81 lines
1.7 KiB
TypeScript
export type Icon =
|
|
| "twitter"
|
|
| "bandcamp"
|
|
| "discord"
|
|
| "envelope"
|
|
| "soundcloud"
|
|
| "teespring"
|
|
| "bluesky";
|
|
|
|
import styles from "../styles/Icons.module.sass";
|
|
import {
|
|
FaBandcamp,
|
|
FaDiscord,
|
|
FaEnvelope,
|
|
FaSoundcloud,
|
|
FaTwitter,
|
|
} from "react-icons/fa";
|
|
import { FaBluesky } from "react-icons/fa6";
|
|
import { SiSpringCreators } from "react-icons/si";
|
|
const Icon = ({
|
|
icon,
|
|
className,
|
|
}: {
|
|
icon: Icon | string;
|
|
className?: string;
|
|
}) => {
|
|
const size = "3rem";
|
|
switch (icon) {
|
|
case "twitter":
|
|
return (
|
|
<FaTwitter
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "bandcamp":
|
|
return (
|
|
<FaBandcamp
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "bluesky":
|
|
return (
|
|
<FaBluesky
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "discord":
|
|
return (
|
|
<FaDiscord
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "envelope":
|
|
return (
|
|
<FaEnvelope
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "soundcloud":
|
|
return (
|
|
<FaSoundcloud
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
case "teespring":
|
|
return (
|
|
<SiSpringCreators
|
|
className={[styles.icon, styles[className]].join(" ")}
|
|
size={size}
|
|
/>
|
|
);
|
|
}
|
|
};
|
|
|
|
export default Icon;
|