fixed missing default value for activeOnlyWhenExact on NavLink

This commit is contained in:
Sebastian Sdorra
2020-03-31 12:02:30 +02:00
parent 5889e834c2
commit 5015c4d133

View File

@@ -26,8 +26,7 @@ import classNames from "classnames";
import { Link, useRouteMatch } from "react-router-dom";
import { RoutingProps } from "./RoutingProps";
import { FC } from "react";
import { useContext } from "react";
import useMenuContext, { MenuContext } from "./MenuContext";
import useMenuContext from "./MenuContext";
type Props = RoutingProps & {
label: string;
@@ -63,4 +62,8 @@ const NavLink: FC<Props> = ({ to, activeOnlyWhenExact, icon, label, title }) =>
);
};
NavLink.defaultProps = {
activeOnlyWhenExact: true
};
export default NavLink;