import { forwardRef } from "react"; import type { ButtonHTMLAttributes, ReactNode, RefAttributes } from "react"; import clsx from "clsx"; import { Loader2 } from "lucide-react"; // The ONE action-button primitive. Before this there were 385 raw ); }); // The implementation takes the permissive shape (it has to destructure every prop); the EXPORT is // what call sites see, and that is where the "a text-less button must be named" union binds. export const Button = ButtonImpl as ( props: ButtonProps & RefAttributes, ) => ReturnType;