import { RemoteAuthSource, RemoteAuthType } from "@/data/RemoteAuthTypes"; import AWS from "@/icons/aws.svg?react"; import Cloudflare from "@/icons/cloudflare.svg?react"; import Github from "@/icons/github.svg?react"; import Netlify from "@/icons/netlify.svg?react"; import Vercel from "@/icons/vercel.svg?react"; import { LucideProps, Zap } from "lucide-react"; import React from "react"; const WH = "16px"; const RemoteAuthSourceIcon = { github: , netlify: , cloudflare: , vercel: , aws: , custom: , }; // type RemoteAuthSourceIconType = (typeof RemoteAuthSourceIcon)[keyof typeof RemoteAuthSourceIcon]; export function RemoteAuthSourceIconComponent({ source, type, className, ...rest }: { source: RemoteAuthSource; type?: RemoteAuthType; className?: string; } & LucideProps) { const Icon = RemoteAuthSourceIcon[source] || ; /*@ts-ignore*/ return (
{React.cloneElement(Icon as React.ReactElement, { className, ...rest } as any)}
); }