2021-07-01 18:21:40 +00:00
|
|
|
import React from "react";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
|
2021-09-06 06:34:13 +00:00
|
|
|
type NavTabProps = {
|
2021-07-01 18:21:40 +00:00
|
|
|
href: string;
|
|
|
|
};
|
|
|
|
|
2021-09-06 06:34:13 +00:00
|
|
|
const NavTab: React.FC<NavTabProps> = ({ href, children }) => (
|
2021-07-01 18:21:40 +00:00
|
|
|
<NavLink
|
|
|
|
className="text-gray-500 border-transparent hover:text-link-blue text-sm font-bold px-3 py-3 border-b-2"
|
|
|
|
activeClassName="text-link-blue border-link-blue"
|
|
|
|
to={href}
|
|
|
|
exact
|
|
|
|
replace
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</NavLink>
|
|
|
|
);
|
|
|
|
|
2021-09-06 06:34:13 +00:00
|
|
|
export default NavTab;
|