test setup lackin
This commit is contained in:
@@ -40,16 +40,20 @@ function Button({
|
||||
variant,
|
||||
size,
|
||||
asChild = false,
|
||||
submit = false,
|
||||
...props
|
||||
}: React.ComponentProps<"button"> &
|
||||
VariantProps<typeof buttonVariants> & {
|
||||
asChild?: boolean
|
||||
submit?: boolean
|
||||
}) {
|
||||
const Comp = asChild ? Slot : "button"
|
||||
|
||||
return (
|
||||
<Comp
|
||||
data-slot="button"
|
||||
type={submit ? "submit" : props.type}
|
||||
data-testid={submit ? "form-submit" : undefined}
|
||||
className={cn(buttonVariants({ variant, size, className }))}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user