Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

328 B
Raw Blame
import * as CountryFlags from "country-flag-icons/react/3x2";
import React from "react";

export function CountryFlag({
  country,
  className,
}: {
  country: string;
  className?: string;
}) {
  const Flag = CountryFlags[country as keyof typeof CountryFlags];
  return Flag ? <Flag className={className ?? "w-5"} /> : null;
}