From 45116a9306e7e126c4c08ef9632e777ebabaffb1 Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Mon, 20 May 2024 14:23:10 +0300 Subject: [PATCH] fix: change props spread order --- src/components/Button/Button.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 81256c0485..1bfde056cd 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -154,13 +154,13 @@ const ButtonWithHandlers = React.forwardRef(function B component, { ...commonProps, - ...restProps, - ...extraProps, ref, tabIndex: disabled ? undefined : 0, role: 'button', 'aria-disabled': disabled, 'aria-pressed': selected, + ...restProps, + ...extraProps, }, content, ); @@ -170,8 +170,6 @@ const ButtonWithHandlers = React.forwardRef(function B return ( )} ref={ref as React.Ref} rel={ linkProps.target === '_blank' && !linkProps.rel @@ -179,6 +177,8 @@ const ButtonWithHandlers = React.forwardRef(function B : linkProps.rel } aria-disabled={disabled} + {...linkProps} + {...(extraProps as React.AnchorHTMLAttributes)} > {content} @@ -189,12 +189,12 @@ const ButtonWithHandlers = React.forwardRef(function B return (