1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-16 00:02:21 +04:00
Files
tabler/site/components/NavLink.tsx
T
2023-07-18 00:13:56 +02:00

17 lines
303 B
TypeScript

import Link from '@/components/Link';
import clsx from 'clsx';
function NavLink({ href, active, children, ...props }) {
if (active) {
props.className = clsx(props.className, 'active');
}
return (
<Link href={href} {...props}>
{children}
</Link>
);
}
export default NavLink;