Fixes #773 - inner wrappers can now be omitted in the local nav markup, in which case they are injected automatically. Note that this does have a very small impact on performance, so if you're able to provide the wrappers yourself, please do so.
This PR also includes a complete refactoring of the LocalNav component. Below is a non-exhaustive list of the changes:
use button rather than span for close/back buttons
add BEM classes on the fly in order to clean-up the CSS and reduce the number of overridden styles
make nested panels look the same as the root panel
underline links on hover
move event bindings for local nav elements out of the InjectedNav component and into the LocalNav component (pass required functions as props)
split local nav code into separate methods to improve code readability
add loads of comments
fix deeply nested panels with regard to vertical overflow, by keeping track of which panels are open at any given time
add nested panels to the doc site's localnav for testing purposes (commented-out)
Fixes #773 -
inner
wrappers can now be omitted in the local nav markup, in which case they are injected automatically. Note that this does have a very small impact on performance, so if you're able to provide the wrappers yourself, please do so.This PR also includes a complete refactoring of the
LocalNav
component. Below is a non-exhaustive list of the changes:button
rather thanspan
for close/back buttonsInjectedNav
component and into theLocalNav
component (pass required functions as props)