Skip to content

Commit

Permalink
change(menu): renamed menuItemListColumns to menuItemChildrenListColu…
Browse files Browse the repository at this point in the history
…mns for greater clarity

- the columns are applied to the children items
  • Loading branch information
ichim-david committed Aug 16, 2023
1 parent 4c69358 commit 5eb91df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ui/Header/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ const debounce = (func) => {

const menuItemsLayouts = {
'/en/topics': {
menuItemListColumns: [1, 4],
menuItemChildrenListColumns: [1, 4],
menuItemColumns: [
'at-a-glance three wide column',
'topics-right-column nine wide column',
Expand All @@ -1191,7 +1191,7 @@ const menuItemsLayouts = {
},
'/en/countries': {
menuItemColumns: ['eight wide column', 'four wide column'],
menuItemListColumns: [5, 2],
menuItemChildrenListColumns: [5, 2],
appendExtraMenuItemsToLastColumn: true,
hideChildrenFromNavigation: false,
},
Expand Down
6 changes: 3 additions & 3 deletions src/ui/Header/HeaderMenuPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const RenderItem = ({ layout, section, renderMenuItem, index }) => {
layout.hideChildrenFromNavigation === undefined
? true
: layout.hideChildrenFromNavigation;
return !layout.menuItemListColumns ||
layout.menuItemListColumns[index] === 1 ? (
return !layout.menuItemChildrenListColumns ||
layout.menuItemChildrenListColumns[index] === 1 ? (
<Item
item={section}
renderMenuItem={renderMenuItem}
Expand All @@ -95,7 +95,7 @@ const RenderItem = ({ layout, section, renderMenuItem, index }) => {
) : (
<ItemGrid
item={section}
columns={layout.menuItemListColumns[index]}
columns={layout.menuItemChildrenListColumns[index]}
renderMenuItem={renderMenuItem}
hideChildrenFromNavigation={hideChildrenFromNavigation}
/>
Expand Down

0 comments on commit 5eb91df

Please sign in to comment.