Migrate icon buttons to Button component and simplify size variants
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:
@@ -1,6 +1,7 @@
|
||||
import { X } from "lucide-react";
|
||||
import { useEffect } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
import { Button } from "./ui/button.js";
|
||||
|
||||
interface ToastProps {
|
||||
message: string;
|
||||
@@ -33,13 +34,14 @@ export function Toast({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon-sm"
|
||||
onClick={onDismiss}
|
||||
className="text-muted-foreground hover:text-hover-neutral"
|
||||
className="text-muted-foreground"
|
||||
>
|
||||
<X className="h-3 w-3" />
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</div>,
|
||||
document.body,
|
||||
|
||||
Reference in New Issue
Block a user