feat: adicionando componente NavLinkContent

This commit is contained in:
Ana Carolina Duarte Cavalcante 2023-01-11 16:08:36 -03:00
parent 4a929edc49
commit 3753841baa

View File

@ -0,0 +1,23 @@
import { NavLink } from "react-router-dom";
interface NavLinkProps {
to: string;
text: string;
}
const NavLinkContent = (props: NavLinkProps) => {
const {to , text} = props;
return (
<li>
<NavLink to={to} style={({ isActive }) => ({
color: isActive ? "#fff" : "#7d7d7d",
background: isActive ? "#000000" : "unset",
fontWeight: isActive ? "700" : "400",})}>
{text}
</NavLink>
</li>
);
};
export { NavLinkContent };