import { Button } from "@mui/material";
import { router } from "@inertiajs/react";

export default function NavLink({ label, href }) {
    return (
        <Button
            variant="text"
            size="small"
            color={window.location.pathname === href ? 'secondary' : ''}
            onClick={() => router.get(href)}
        >
            {label}
        </Button >
    )
}