demo(refactor): remove unnecessary ref props

This commit is contained in:
Bereket Engida
2025-03-04 20:55:46 +03:00
parent 9d8bbb7471
commit 68c108ca85
5 changed files with 25 additions and 79 deletions

View File

@@ -41,20 +41,16 @@ export interface ButtonProps
}
const Button = ({
ref,
className,
variant,
size,
asChild = false,
...props
}: ButtonProps & {
ref: React.RefObject<HTMLButtonElement>;
}) => {
}: ButtonProps) => {
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
);