mirror of
https://github.com/joelhooks/joelclaw.git
synced 2026-09-19 01:24:04 +08:00
016dccc295
- 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)
29 lines
766 B
TypeScript
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>
|
|
);
|
|
}
|