import { ReactNode } from "react"; import Image from "next/image"; interface ConnectionCardProps { icon: string | ReactNode; title: string; description?: string; connected: boolean; connectedAs?: string; onConnect: () => void; onDisconnect: () => void; isLoading?: boolean; } export function ConnectionCard({ icon, title, description, connected, connectedAs, onConnect, onDisconnect, isLoading }: ConnectionCardProps) { return (
{/* Icon */}
{typeof icon === "string" ? ( {title} ) : ( icon )}
{/* Text */}
{title}
{connected && connectedAs ? (
Connected as {connectedAs}
) : description ? (
{description}
) : null}
{/* Action Button */}
); }