diff --git a/src/@next/Bar/Bar.tsx b/src/@next/Bar/Bar.tsx index e252760e4..f6d9dcf10 100644 --- a/src/@next/Bar/Bar.tsx +++ b/src/@next/Bar/Bar.tsx @@ -64,6 +64,14 @@ export const Bar = React.forwardRef(function Bar( const buttonSize: 'default' | 'large' = width <= breakpointWidth ? 'default' : 'large'; + function makeButtonProps(buttonAction: ComponentAction) { + const { onClick, action, ...otherProps } = buttonAction; + return { + onClick: onClick || action, + ...otherProps, + }; + } + return ( @@ -79,17 +87,20 @@ export const Bar = React.forwardRef(function Bar( ) : ( {tertiaryAction && ( - )} {secondaryAction && ( - )} {primaryAction && ( - + {primaryAction.label} )}