Migrate icon buttons to Button component and simplify size variants
All checks were successful
CI / check (push) Successful in 48s
CI / build-image (push) Successful in 18s

Replace raw <button> elements with Button variant="ghost" in stat-block
panel, toast, player modals. Add icon-sm size variant (h-6 w-6) for
compact contexts. Consolidate text button sizes into a single default
(h-8 px-3), removing the redundant sm variant. Add size prop to
ConfirmButton for consistent sizing.

Button now has three sizes: default (text), icon, icon-sm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-13 17:14:44 +01:00
parent f9ef64bb00
commit 85acb5c185
10 changed files with 56 additions and 59 deletions

View File

@@ -52,19 +52,20 @@ export function PlayerManagement({
<h2 className="text-lg font-semibold text-foreground">
Player Characters
</h2>
<button
type="button"
<Button
variant="ghost"
size="icon"
onClick={onClose}
className="text-muted-foreground hover:text-hover-neutral transition-colors"
className="text-muted-foreground"
>
<X size={20} />
</button>
</Button>
</div>
{characters.length === 0 ? (
<div className="flex flex-col items-center gap-3 py-8 text-center">
<p className="text-muted-foreground">No player characters yet</p>
<Button onClick={onCreate} size="sm">
<Button onClick={onCreate}>
<Plus size={16} />
Create your first player character
</Button>
@@ -92,25 +93,27 @@ export function PlayerManagement({
<span className="text-xs tabular-nums text-muted-foreground">
HP {pc.maxHp}
</span>
<button
type="button"
<Button
variant="ghost"
size="icon-sm"
onClick={() => onEdit(pc)}
className="text-muted-foreground hover:text-hover-neutral transition-colors"
className="text-muted-foreground"
title="Edit"
>
<Pencil size={14} />
</button>
</Button>
<ConfirmButton
icon={<Trash2 size={14} />}
label="Delete player character"
onConfirm={() => onDelete(pc.id)}
className="h-6 w-6 text-muted-foreground"
size="icon-sm"
className="text-muted-foreground"
/>
</div>
);
})}
<div className="mt-2 flex justify-end">
<Button onClick={onCreate} size="sm" variant="ghost">
<Button onClick={onCreate} variant="ghost">
<Plus size={16} />
Add
</Button>