meshtastic/src/components/homepage/SocialCard.tsx

32 lines
753 B
TypeScript
Raw Normal View History

2024-02-08 13:23:54 -08:00
import type React from "react";
2023-01-19 04:41:44 -08:00
import { FiExternalLink } from "react-icons/fi";
export interface SocialCardProps {
2023-09-09 05:16:14 -07:00
children: React.ReactNode;
color: string;
link: string;
}
export const SocialCard = ({
2023-09-09 05:16:14 -07:00
children,
color,
link,
}: SocialCardProps): JSX.Element => {
2023-09-09 05:16:14 -07:00
return (
<div
className={`group relative flex h-24 w-36 min-w-max flex-shrink-0 rounded-xl shadow-xl ${color} m-2`}
>
{children}
<a
className="absolute top-0 left-0 right-0 bottom-0 hidden rounded-xl border border-accent bg-secondary bg-opacity-95 text-2xl shadow-xl group-hover:flex"
href={link}
rel="noreferrer"
target="_blank"
>
<FiExternalLink className="m-auto" />
</a>
</div>
);
};