Hi there, I've went throu the polymorphic components documentation, implemented the component as such:
import classes from './NavBar.module.css';
function NavbarLink({ icon: Icon, label, href }: NavbarLinkProps) {
return (
<Tooltip label={label} position="right" transitionProps={{ duration: 0 }}>
<UnstyledButton
className={classes.link}
renderRoot={({ className, ...others }) => (
<NavLink
to={href}
className={({ isActive }) =>
cx(className, { 'active': isActive })
}
{...others}
/>
)}>
<Icon stroke={1.5} />
</UnstyledButton>
</Tooltip>
);
}
It renders as such: <a type="button" aria-current="page" class="mantine-focus-auto _link_1o6c9_15 m-87cf2631 mantine-UnstyledButton-root active" href="/projects?tab=list">
Any Idea?