mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-24 15:08:44 -05:00
29 lines
714 B
TypeScript
29 lines
714 B
TypeScript
import { NavLink } from "@remix-run/react";
|
|
import type { LinkProps } from "@remix-run/react";
|
|
import clsx from "clsx";
|
|
import type * as React from "react";
|
|
import { ArrowUpIcon } from "./icons/ArrowUp";
|
|
|
|
export function SubNav({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<div>
|
|
<nav className="sub-nav__container">{children}</nav>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function SubNavLink({
|
|
children,
|
|
className,
|
|
...props
|
|
}: LinkProps & {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<NavLink className={clsx("sub-nav__link", className)} end {...props}>
|
|
<span className="sub-nav__link__text">{children}</span>
|
|
<ArrowUpIcon className="sub-nav__active-icon" />
|
|
</NavLink>
|
|
);
|
|
}
|