Files
joelhooks__joelclaw/packages/ui/src/refresh-button.tsx
Joel Hooks 016dccc295 redesign: cool finds index — full titles, readable descriptions, compact cards
- Titles wrap fully instead of truncating
- Relevance text shows complete (no line-clamp)
- Date shown as relative time (2d ago) above title, not stealing width
- Single type badge (repo/article/video) replaces full tag list
- Source URL removed from index (shown on detail page)
- Tighter card spacing for better scan density
- Re-removed duplicate self-hosting discovery (also from Vault source)
2026-02-22 08:07:35 -08:00

29 lines
766 B
TypeScript

import type { JSX } from "react";
export function RefreshButton({
onClick,
loading,
label = "refresh",
className,
}: {
onClick: () => void;
loading?: boolean;
label?: string;
className?: string;
}): JSX.Element {
return (
<button
type="button"
onClick={onClick}
disabled={loading}
className={`rounded border border-neutral-800/50 px-2.5 py-1 font-mono text-[10px] uppercase tracking-wide text-neutral-500 transition-colors hover:border-neutral-700/60 hover:text-neutral-300 disabled:opacity-50 ${className ?? ""}`}
>
{loading ? (
<span className="inline-block h-3 w-3 animate-spin rounded-full border border-neutral-700 border-t-neutral-400" />
) : (
label
)}
</button>
);
}