otterscan/src/components/Tab.tsx
2021-07-01 15:47:23 -03:00

21 lines
434 B
TypeScript

import React from "react";
import { NavLink } from "react-router-dom";
type TabProps = {
href: string;
};
const Tab: React.FC<TabProps> = ({ href, children }) => (
<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>
);
export default Tab;