mirror of
https://github.com/tabler/tabler.git
synced 2026-08-16 00:02:21 +04:00
17 lines
303 B
TypeScript
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;
|