fix block test

This commit is contained in:
Jonathan Summers-Muir committed 2023-06-13 18:05:07 +08:00
1 parent 8a8e451de1
commit 142f256641
1 file changed
+2 -2
+2 -2
View File
@@ -151,7 +151,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ asChild = false, size = 'tiny', type = 'primary', children, ...props }, ref) => {
const Comp = asChild ? Slot : 'button'
const { className, disabled, loading, icon, iconLeft, iconRight } = props
const { className, disabled, loading, icon, iconLeft, iconRight, block } = props
const showIcon = loading || icon
@@ -163,7 +163,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
ref={ref}
type={props.htmlType}
{...props}
className={cn(buttonVariants({ type, size, disabled }), className)}
className={cn(buttonVariants({ type, size, disabled, block }), className)}
>
{asChild ? (
React.isValidElement(children) ? (