This doesn't change the functionality any, it's just some code clean-up so that HeroSelect and MapSelect are a bit simpler. Now they use a generic SelectMenu component. This should make it easier to make all such menus in the app more consistent in appearance and behavior, in a follow-up branch. Menus can make use of the new SelectMenu component instead of copy-pasting common functionality like onMenuItemClick, handleClickOutside, etc.
This also improves the appearance of text in the menu that is longer than the menu is wide: now menu items truncate with a ... instead of being cut off or having the ✅ covering part of the text:
This doesn't change the functionality any, it's just some code clean-up so that HeroSelect and MapSelect are a bit simpler. Now they use a generic SelectMenu component. This should make it easier to make all such menus in the app more consistent in appearance and behavior, in a follow-up branch. Menus can make use of the new SelectMenu component instead of copy-pasting common functionality like
onMenuItemClick
,handleClickOutside
, etc.This also improves the appearance of text in the menu that is longer than the menu is wide: now menu items truncate with a
...
instead of being cut off or having the ✅ covering part of the text: