Add checkProps to GlobalNavigationBarLink and MenuDropdown to warn folks if they don't use the right event prop
I noticed that GlobalNavigationBarRegion has inconsistent prop names for the "onSelect" event in it's sub-components. GlobalNavigationBarLink is "onClick," while GlobalNavigationBarDropdown is "onSelect." These should probably both be one or the other for consistency purposes.
for example, this: https://github.com/salesforce-ux/design-system-react/blob/master/stories/global-navigation-bar/index.jsx#L49
compared to: https://github.com/salesforce-ux/design-system-react/blob/master/stories/global-navigation-bar/index.jsx#L55
As a menu, the dropdown allows you to make a "selection" while a link is something you can "click." This is consistent with the native React events, though possibly we should consider naming the event onChange
@tweettypography i see "possibly"
what else needs to be considered to make a decisive statement on this?
It's a breaking API change, I'd need some pretty strong reasoning to switch to onChange from onSelect. Some native components throw both, I believe, so if someone has a need for that it's something that could be considered.
I'm going to reopen and ask that this be dealt with via a propCheck that will yell at you if you use onClick or onSelect in the wrong spot in order to add clarity.
@swilliamset Sound good?
I could see that being useful
I'm going to call this read the documentation, unless someone wants to take it.