Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

544 B
Raw Blame
import { ProviderIcon } from "@app/components/v3";
import { PamAccountType, usePamAccountTypeMap } from "@app/hooks/api/pam";

type Props = {
  accountType: PamAccountType;
  size?: number;
};

export const AccountPlatformIcon = ({ accountType, size = 28 }: Props) => {
  const { map } = usePamAccountTypeMap();
  const meta = map[accountType];

  if (!meta) return null;

  return (
    <ProviderIcon
      icon={meta.icon}
      alt={meta.name}
      className="shrink-0 rounded-sm"
      style={{ width: size, height: size }}
    />
  );
};