diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 97b3362..bbbe4f0 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -20,7 +20,7 @@ export default withMdx({ rehypePrettyCode, /** @type {import("rehype-pretty-code").Options} */ ({ - theme: { dark: "one-dark-pro", light: "github-light" }, + theme: { dark: "one-dark-pro", light: "min-light" }, getHighlighter, onVisitLine(node) { // Prevent lines from collapsing in `display: grid` mode, and allow empty diff --git a/docs/src/app/docs/layout.tsx b/docs/src/app/docs/layout.tsx index ec5e67f..56e0a3e 100644 --- a/docs/src/app/docs/layout.tsx +++ b/docs/src/app/docs/layout.tsx @@ -14,7 +14,7 @@ export const metadata: Metadata = { export default function DocsLayout(props: { children: ReactNode }) { return (
-
diff --git a/docs/src/components/main-nav.tsx b/docs/src/components/main-nav.tsx index 5c26454..d6d2d46 100644 --- a/docs/src/components/main-nav.tsx +++ b/docs/src/components/main-nav.tsx @@ -5,7 +5,7 @@ import Link from "next/link"; import { cn } from "@/lib/cn"; import { Icons } from "@/components/icons"; -import { usePathname } from "next/navigation"; +import { useSelectedLayoutSegment } from "next/navigation"; export interface NavItem { title: string; @@ -17,30 +17,31 @@ export interface NavItem { } export function MainNav(props: { items: NavItem[] }) { - const pathname = usePathname(); + const segment = useSelectedLayoutSegment(); + + const isActive = (href: string) => { + if (!segment) return false; + return href.startsWith(`/${segment}`); + }; return ( -
- {props.items?.length ? ( - - ) : null} -
+ ); } diff --git a/docs/src/components/mobile-nav.tsx b/docs/src/components/mobile-nav.tsx index ccc9f2d..4ec0c66 100644 --- a/docs/src/components/mobile-nav.tsx +++ b/docs/src/components/mobile-nav.tsx @@ -34,12 +34,14 @@ export function MobileDropdown(props: { - + {props.items.docs.map((item, index) => (
diff --git a/docs/src/components/site-header.tsx b/docs/src/components/site-header.tsx index a951a7b..45a030e 100644 --- a/docs/src/components/site-header.tsx +++ b/docs/src/components/site-header.tsx @@ -9,50 +9,52 @@ import { MobileDropdown } from "@/components/mobile-nav"; export function SiteHeader() { return ( -
-
- - - - {siteConfig.name} - - - - -
- + +
diff --git a/docs/src/components/theme-toggle.tsx b/docs/src/components/theme-toggle.tsx index 7de133c..6788467 100644 --- a/docs/src/components/theme-toggle.tsx +++ b/docs/src/components/theme-toggle.tsx @@ -12,11 +12,11 @@ export function ThemeToggle() { return ( ); diff --git a/docs/src/components/ui/button.tsx b/docs/src/components/ui/button.tsx index 8854a31..62abdb9 100644 --- a/docs/src/components/ui/button.tsx +++ b/docs/src/components/ui/button.tsx @@ -19,9 +19,10 @@ const buttonVariants = cva( link: "underline-offset-4 hover:underline text-primary", }, size: { + lg: "h-11 px-8 rounded-md", default: "h-10 py-2 px-4", sm: "h-9 px-3 rounded-md", - lg: "h-11 px-8 rounded-md", + icon: "h-9 w-9", }, }, defaultVariants: { diff --git a/docs/src/styles/globals.css b/docs/src/styles/globals.css index 9b4148b..d15909e 100644 --- a/docs/src/styles/globals.css +++ b/docs/src/styles/globals.css @@ -7,8 +7,8 @@ --background: 0 0% 100%; --foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; + --muted: 270 20% 98%; + --muted-foreground: 252 5% 40.7%; --popover: 0 0% 100%; --popover-foreground: 222.2 47.4% 11.2%; diff --git a/docs/tailwind.config.ts b/docs/tailwind.config.ts index 8a8a602..b6f035c 100644 --- a/docs/tailwind.config.ts +++ b/docs/tailwind.config.ts @@ -105,5 +105,8 @@ export default { }, }, }, + future: { + hoverOnlyWhenSupported: true, + }, plugins: [require("tailwindcss-animate")], } satisfies Config;