From bb25919abca92e684925cdc7946897c5093fb4c0 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Mon, 12 Aug 2019 14:28:02 +0200 Subject: [PATCH] Swap params for mergeProps helper --- packages/components/src/dropdown-menu/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js index 0c013d8f3619e4..e94b246231ad1b 100644 --- a/packages/components/src/dropdown-menu/index.js +++ b/packages/components/src/dropdown-menu/index.js @@ -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, @@ -70,10 +70,10 @@ function DropdownMenu( { controlSets = [ controlSets ]; } } - const mergedPopoverProps = mergeProps( popoverProps, { + const mergedPopoverProps = mergeProps( { className: 'components-dropdown-menu__popover', position, - } ); + }, popoverProps ); return ( { - const mergedMenuProps = mergeProps( menuProps, { + const mergedMenuProps = mergeProps( { 'aria-label': menuLabel || label, className: 'components-dropdown-menu__menu', - } ); + }, menuProps ); return (