mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
fixed active state of sub navigation items, which are using activeWhenMatch
This commit is contained in:
committed by
René Pfeuffer
parent
91aca71591
commit
dcac6b3f22
@@ -86,4 +86,18 @@ storiesOf("Navigation|Secondary", module)
|
||||
</SecondaryNavigation>
|
||||
</BinderContext.Provider>
|
||||
);
|
||||
});
|
||||
})
|
||||
.add("Active when match", () =>
|
||||
withRoute("/hog")(
|
||||
<SecondaryNavigation label="Hitchhiker">
|
||||
<SecondaryNavigationItem to="/42" icon="fas fa-puzzle-piece" label="Puzzle 42" title="Puzzle 42" />
|
||||
<SecondaryNavigationItem
|
||||
activeWhenMatch={route => route.location.pathname === "/hog"}
|
||||
to="/heart-of-gold"
|
||||
icon="fas fa-star"
|
||||
label="Heart Of Gold"
|
||||
title="Heart Of Gold"
|
||||
/>
|
||||
</SecondaryNavigation>
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user