Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

872 B
Raw Blame
import { supportedIntegrations } from "@site/src/constants/supported-integrations";
import { CommonWidgetProps, WidgetCard } from "./card";
import clsx from "clsx";

interface AppWidgetProps extends CommonWidgetProps {
  name: string;
  label?: string;
}

export const AppWidget = ({ name, label, className }: AppWidgetProps) => {
  const app = supportedIntegrations.find((integration) => integration.name === name);
  if (!app) return null;

  return (
    <WidgetCard width={1} className={clsx("app-card text-center", className)}>
      <span className="absolute top-2 inset-x-1 text-sm font-bold leading-4">{label ?? app.name}</span>
      <img src={app.iconUrl} className="absolute bottom-0 size-24 object-contain scale-[0.6]" alt="" />
      <div className="absolute bottom-3 right-3 rounded-full bg-green-500 w-2 h-2" aria-hidden="true" />
    </WidgetCard>
  );
};