- Diferenças entre localizações em tabela por ano, população inteira com separador de milhares e a advertência uma só vez (legenda da tabela). - Componente NextActions: opções seguintes agrupadas numa lista com título, separadas do texto; aplicado às alternativas de exploração da carteira. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jm
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import { Link } from '@inertiajs/react';
|
|
|
|
export type NextAction = { label: string; href: string; description?: string };
|
|
|
|
/**
|
|
* Next steps grouped in one place, one per line, apart from the surrounding text
|
|
* (mapa de erros 4.5: options mixed into a line of text are hard to find).
|
|
*/
|
|
export default function NextActions({
|
|
title = 'Próximos passos',
|
|
actions,
|
|
}: {
|
|
title?: string;
|
|
actions: NextAction[];
|
|
}) {
|
|
if (!actions.length) return null;
|
|
return (
|
|
<nav aria-label={title} className="space-y-2">
|
|
<h3 className="font-semibold">{title}</h3>
|
|
<ul className="grid gap-2 sm:grid-cols-2 lg:grid-cols-3">
|
|
{actions.map((action) => (
|
|
<li key={action.href + action.label}>
|
|
<Link
|
|
className="block h-full rounded border bg-white p-3 font-medium text-emerald-900 underline-offset-4 hover:underline"
|
|
href={action.href}
|
|
>
|
|
{action.label}
|
|
{action.description && (
|
|
<span className="mt-1 block text-sm font-normal text-slate-700">
|
|
{action.description}
|
|
</span>
|
|
)}
|
|
</Link>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</nav>
|
|
);
|
|
}
|