Skip to content

Commit

Permalink
707, 424: Fixed alignment problem when some icons in menu have a lead…
Browse files Browse the repository at this point in the history
…ing icon and others don't
  • Loading branch information
tombogle committed Mar 1, 2024
1 parent 4d3968b commit 2169206
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 277 deletions.
274 changes: 137 additions & 137 deletions lib/platform-bible-react/dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.cjs.map

Large diffs are not rendered by default.

276 changes: 139 additions & 137 deletions lib/platform-bible-react/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export default function GroupedMenuItemList(menuProps: GroupedMenuItemListProps)
// No divider after last item in final group.
if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = false;

const allowSpaceForLeadingIcons = itemArray.some((i) => 'iconPathBefore' in i);
const allowSpaceForLeadingIcons = itemArray.some(
(i) => 'iconPathBefore' in i.item && i.item.iconPathBefore,
);

return { items: itemArray, allowForLeadingIcons: allowSpaceForLeadingIcons };
}, [includedGroups, menuDefinition]);
Expand Down

0 comments on commit 2169206

Please sign in to comment.