@jsenv/navi 0.11.18 → 0.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsenv_navi.js +6 -6
- package/dist/jsenv_navi.js.map +10 -9
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -11786,7 +11786,7 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11786
11786
|
const innerClassName = withPropsClassName("navi_link", className);
|
|
11787
11787
|
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
11788
11788
|
base: {
|
|
11789
|
-
|
|
11789
|
+
cursor: pointerDefaultWhenCurrent && targetIsCurrent ? "default" : undefined
|
|
11790
11790
|
},
|
|
11791
11791
|
layout: true,
|
|
11792
11792
|
typo: true
|
|
@@ -11983,20 +11983,20 @@ const LinkWithAction = forwardRef((props, ref) => {
|
|
|
11983
11983
|
const RouteLink = ({
|
|
11984
11984
|
route,
|
|
11985
11985
|
routeParams,
|
|
11986
|
+
active,
|
|
11986
11987
|
children,
|
|
11987
11988
|
...rest
|
|
11988
11989
|
}) => {
|
|
11989
11990
|
if (!route) {
|
|
11990
|
-
throw new Error("
|
|
11991
|
+
throw new Error("route prop is required");
|
|
11991
11992
|
}
|
|
11992
|
-
const
|
|
11993
|
-
active
|
|
11994
|
-
} = useRouteStatus(route);
|
|
11993
|
+
const routeStatus = useRouteStatus(route);
|
|
11995
11994
|
const url = route.buildUrl(routeParams);
|
|
11995
|
+
const innerActive = active || routeStatus.active;
|
|
11996
11996
|
return jsx(Link, {
|
|
11997
11997
|
...rest,
|
|
11998
11998
|
href: url,
|
|
11999
|
-
active:
|
|
11999
|
+
active: innerActive,
|
|
12000
12000
|
children: children
|
|
12001
12001
|
});
|
|
12002
12002
|
};
|