diff --git a/packages/react/components/Button.tsx b/packages/react/components/Button.tsx index 7815c00..ec5f5e4 100644 --- a/packages/react/components/Button.tsx +++ b/packages/react/components/Button.tsx @@ -107,11 +107,12 @@ export interface ButtonProps const Button = React.forwardRef( (props, ref) => { - const [variantProps, otherProps] = resolveVariants(props); + const [variantProps, otherPropsCompressed] = resolveVariants(props); + const { asChild, ...otherPropsExtracted } = otherPropsCompressed; - const Comp = otherProps.asChild ? Slot : "button"; + const Comp = asChild ? Slot : "button"; const compProps = { - ...otherProps, + ...otherPropsExtracted, className: buttonVariants(variantProps), };