Files
OpenShell/docs/_components/BadgeLinks.tsx
Piotr Mlocek 8b15ef772e docs(fern): move published docs into docs tree (#796)
Remove the legacy Sphinx pipeline and make docs/ the single source of truth so the published site matches the repository layout.
2026-04-09 15:02:27 -07:00

27 lines
674 B
TypeScript

/**
* Badge links for GitHub, License, PyPI, etc.
* Uses a flex wrapper to display badges horizontally and hides Fern's
* external-link icon that otherwise stacks under each badge image.
* Requires the `.badge-links` CSS rule from main.css.
*/
export type BadgeItem = {
href: string;
src: string;
alt: string;
};
export function BadgeLinks({ badges = [] }: { badges?: BadgeItem[] }) {
if (badges.length === 0) {
return null;
}
return (
<div className="badge-links">
{badges.map((b) => (
<a key={b.href} href={b.href} target="_blank" rel="noreferrer">
<img src={b.src} alt={b.alt} />
</a>
))}
</div>
);
}