fix(ui): use defined theme colors for danger/warning buttons

The theme only defines danger/warning/success as flat colors plus -50/-100/-700
shades. bg-danger-600 and bg-warning-600 don't exist so those buttons rendered
with a transparent background, making white text invisible until hover revealed
bg-danger-700. Replaced with bg-danger / bg-warning which are defined.
Also fixed border-danger-200/400 and text-danger-600 (undefined) on the
Delete and Confirm Delete buttons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hardik 2026-05-27 13:11:10 +05:30
parent 3e5d11c4ae
commit 49ba6e8be5
2 changed files with 5 additions and 5 deletions

View file

@ -105,7 +105,7 @@ export function PaymentActions({ poId, poStatus, totalAmount = 0, paidAmount = 0
<button <button
type="submit" type="submit"
disabled={pending} disabled={pending}
className="rounded-lg bg-warning-600 px-4 py-2 text-sm font-semibold text-white hover:opacity-90 disabled:opacity-60 transition-opacity" className="rounded-lg bg-warning px-4 py-2 text-sm font-semibold text-white hover:opacity-90 disabled:opacity-60 transition-opacity"
> >
{pending ? "Confirming…" : "Confirm Partial Payment"} {pending ? "Confirming…" : "Confirm Partial Payment"}
</button> </button>

View file

@ -34,13 +34,13 @@ export function ConfirmDeleteButton({
}) })
} }
disabled={isPending} disabled={isPending}
className="rounded border border-danger-400 bg-danger-600 px-2 py-0.5 text-xs font-semibold text-white hover:bg-danger-700 disabled:opacity-50 whitespace-nowrap transition-colors" className="rounded border border-danger bg-danger px-2 py-0.5 text-xs font-semibold text-white hover:bg-danger-700 disabled:opacity-50 whitespace-nowrap transition-colors"
> >
{isPending ? "Deleting…" : "Confirm"} {isPending ? "Deleting…" : "Confirm Delete"}
</button> </button>
<button <button
onClick={() => { setConfirming(false); setError(""); }} onClick={() => { setConfirming(false); setError(""); }}
className="rounded border border-neutral-300 bg-white px-2 py-0.5 text-xs text-neutral-600 hover:bg-neutral-50 whitespace-nowrap transition-colors" className="rounded border border-neutral-300 bg-white px-2 py-0.5 text-xs font-medium text-neutral-600 hover:bg-neutral-50 whitespace-nowrap transition-colors"
> >
Cancel Cancel
</button> </button>
@ -52,7 +52,7 @@ export function ConfirmDeleteButton({
return ( return (
<button <button
onClick={() => setConfirming(true)} onClick={() => setConfirming(true)}
className="rounded border border-danger-200 bg-white px-2.5 py-1 text-xs font-medium text-danger-600 hover:bg-danger-50 hover:border-danger-300 transition-colors" className="rounded border border-danger-100 bg-white px-2.5 py-1 text-xs font-medium text-danger-700 hover:bg-danger-50 hover:border-danger transition-colors"
> >
Delete Delete
</button> </button>