mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 17:52:49 +00:00
The plugins page opens with the directory copy, plugin and author counts, Submit a plugin and Read the docs, and search. Featured and What's new cards show the description and the author with avatar; the trailing slot carries installs on Featured and the added date on What's new. Every install count on the site is the same download icon and number.
25 lines
838 B
TypeScript
25 lines
838 B
TypeScript
import { pluginOverviewUrl } from "@getpaseo/protocol/plugin-overview";
|
|
import type { Plugin } from "./registry";
|
|
|
|
const SIZE_CLASS = {
|
|
xs: "h-6 w-6 rounded-md text-xs",
|
|
sm: "h-9 w-9 rounded-lg text-sm",
|
|
lg: "h-14 w-14 rounded-xl text-xl",
|
|
} as const;
|
|
|
|
/** PNG icon with a letter tile when no icon is published. */
|
|
export function PluginTile({ plugin, size }: { plugin: Plugin; size: keyof typeof SIZE_CLASS }) {
|
|
return (
|
|
<div
|
|
aria-hidden
|
|
className={`flex flex-shrink-0 items-center justify-center border border-white/10 bg-white/[0.06] font-medium text-white/80 ${SIZE_CLASS[size]}`}
|
|
>
|
|
{pluginOverviewUrl(plugin.icon) ? (
|
|
<img src={plugin.icon} alt="" className="h-full w-full rounded-[inherit] object-cover" />
|
|
) : (
|
|
plugin.name.charAt(0).toUpperCase()
|
|
)}
|
|
</div>
|
|
);
|
|
}
|