diff --git a/src/components/ui/buttons/Button.tsx b/src/components/ui/buttons/Button.tsx index 7bdfdb006d8..000d6736854 100644 --- a/src/components/ui/buttons/Button.tsx +++ b/src/components/ui/buttons/Button.tsx @@ -108,22 +108,37 @@ const Button = React.forwardRef( ) Button.displayName = "Button" -type ButtonLinkProps = Omit & { - buttonProps?: ButtonProps - customEventOptions?: MatomoEventOptions -} +type ButtonLinkProps = Omit & + Pick & { + buttonProps?: Omit + customEventOptions?: MatomoEventOptions + } const ButtonLink = React.forwardRef( ( - { buttonProps, customEventOptions, children, className, ...linkProps }, + { + size, + variant, + isSecondary, + buttonProps, + customEventOptions, + children, + className, + ...linkProps + }, ref ) => { - const { size, variant } = buttonProps || {} const handleClick = () => { customEventOptions && trackCustomEvent(customEventOptions) } return ( -