mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-05 05:00:06 +00:00
* feat: add user_template setting * style: header * style: page padding * style: header * feat: header now time * style: login page * feat: nav indicator * style: button inset shadow * style: footer text size * feat: header show login_ip * fix: error toast * fix: frontend_templates setting * fix: lint * feat: pr auto format * chore: auto-fix linting and formatting issues --------- Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
import {
|
|
NavigationMenuLinkProps,
|
|
NavigationMenuTriggerProps,
|
|
} from "@radix-ui/react-navigation-menu"
|
|
import { motion } from "framer-motion"
|
|
|
|
import {
|
|
NavigationMenuLink,
|
|
NavigationMenuTrigger,
|
|
navigationMenuTriggerStyle,
|
|
} from "../ui/navigation-menu"
|
|
|
|
export const NzNavigationMenuLink = (
|
|
props: NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>,
|
|
) => {
|
|
return (
|
|
<div className="relative">
|
|
<NavigationMenuLink
|
|
{...props}
|
|
className={
|
|
navigationMenuTriggerStyle() +
|
|
" hover:bg-inherit data-[active]:bg-inherit transition-colors text-foreground/60 data-[active]:text-foreground hover:text-foreground/90"
|
|
}
|
|
/>
|
|
{props.active && (
|
|
<motion.div
|
|
layoutId="tab-underline"
|
|
className="absolute bottom-0 left-0 right-0 h-[2px] bg-black dark:bg-white"
|
|
/>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export const NzNavigationMenuTrigger = (
|
|
props: Omit<NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> &
|
|
React.RefAttributes<HTMLButtonElement>,
|
|
) => {
|
|
return (
|
|
<NavigationMenuTrigger
|
|
{...props}
|
|
className={
|
|
navigationMenuTriggerStyle() +
|
|
" hover:bg-inherit data-[active]:bg-inherit transition-colors text-foreground/60 data-[active]:text-foreground hover:text-foreground/90"
|
|
}
|
|
/>
|
|
)
|
|
}
|