Skip to content

Commit

Permalink
Swap params for mergeProps helper
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Aug 12, 2019
1 parent 5c246a3 commit bb25919
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/components/src/dropdown-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import IconButton from '../icon-button';
import Dropdown from '../dropdown';
import { NavigableMenu } from '../navigable-container';

function mergeProps( props = {}, defaultProps = {} ) {
function mergeProps( defaultProps = {}, props = {} ) {
const mergedProps = {
...defaultProps,
...props,
Expand Down Expand Up @@ -70,10 +70,10 @@ function DropdownMenu( {
controlSets = [ controlSets ];
}
}
const mergedPopoverProps = mergeProps( popoverProps, {
const mergedPopoverProps = mergeProps( {
className: 'components-dropdown-menu__popover',
position,
} );
}, popoverProps );

return (
<Dropdown
Expand All @@ -87,12 +87,12 @@ function DropdownMenu( {
onToggle();
}
};
const mergedToggleProps = mergeProps( toggleProps, {
const mergedToggleProps = mergeProps( {
className: classnames( 'components-dropdown-menu__toggle', {
'is-opened': isOpen,
} ),
tooltip: label,
} );
}, toggleProps );

return (
<IconButton
Expand All @@ -109,10 +109,10 @@ function DropdownMenu( {
);
} }
renderContent={ ( props ) => {
const mergedMenuProps = mergeProps( menuProps, {
const mergedMenuProps = mergeProps( {
'aria-label': menuLabel || label,
className: 'components-dropdown-menu__menu',
} );
}, menuProps );

return (
<NavigableMenu
Expand Down

0 comments on commit bb25919

Please sign in to comment.