feat(navbar): add modular navbar components and color variables
This commit is contained in:
parent
6dbc16f23d
commit
6c4ef371c1
7 changed files with 154 additions and 48 deletions
26
apps/web/src/components/navbar/NavLink.tsx
Normal file
26
apps/web/src/components/navbar/NavLink.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { Link } from "@tanstack/react-router";
|
||||
|
||||
type NavLinkProps = { to: string; children: React.ReactNode };
|
||||
|
||||
const NavLink = ({ to, children }: NavLinkProps) => {
|
||||
return (
|
||||
<Link
|
||||
to={to}
|
||||
className="relative text-sm font-medium text-(--color-text-muted) transition-colors duration-200
|
||||
hover:text-(--color-primary)
|
||||
[&.active]:text-(--color-primary)
|
||||
[&.active]:after:absolute
|
||||
[&.active]:after:-bottom-1
|
||||
[&.active]:after:left-0
|
||||
[&.active]:after:w-full
|
||||
[&.active]:after:h-0.5
|
||||
[&.active]:after:bg-(--color-accent)
|
||||
[&.active]:after:rounded-full
|
||||
[&.active]:after:content-['']"
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavLink;
|
||||
Loading…
Add table
Add a link
Reference in a new issue