mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-09 06:55:07 +00:00
* feat(form): add form component * feat(www): update site styles * feat: add form examples * docs(www): add docs for forms * docs(www): hide tabs for docs demo
66 lines
2.1 KiB
TypeScript
66 lines
2.1 KiB
TypeScript
import Link from "next/link"
|
|
|
|
import { siteConfig } from "@/config/site"
|
|
import { cn } from "@/lib/utils"
|
|
import { buttonVariants } from "@/components/ui/button"
|
|
import { CommandMenu } from "@/components/command-menu"
|
|
import { Icons } from "@/components/icons"
|
|
import { MainNav } from "@/components/main-nav"
|
|
import { MobileNav } from "@/components/mobile-nav"
|
|
import { ModeToggle } from "@/components/mode-toggle"
|
|
|
|
export function SiteHeader() {
|
|
return (
|
|
<header className="supports-backdrop-blur:bg-background/60 sticky top-0 z-40 w-full border-b bg-background/95 backdrop-blur">
|
|
<div className="container flex h-14 items-center">
|
|
<MainNav />
|
|
<MobileNav />
|
|
<div className="flex flex-1 items-center justify-between space-x-2 sm:space-x-4 md:justify-end">
|
|
<div className="w-full flex-1 md:w-auto md:flex-none">
|
|
<CommandMenu />
|
|
</div>
|
|
<nav className="flex items-center space-x-1">
|
|
<Link
|
|
href={siteConfig.links.github}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
<div
|
|
className={cn(
|
|
buttonVariants({
|
|
size: "sm",
|
|
variant: "ghost",
|
|
}),
|
|
"w-9 px-0"
|
|
)}
|
|
>
|
|
<Icons.gitHub className="h-5 w-5" />
|
|
<span className="sr-only">GitHub</span>
|
|
</div>
|
|
</Link>
|
|
<Link
|
|
href={siteConfig.links.twitter}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
<div
|
|
className={cn(
|
|
buttonVariants({
|
|
size: "sm",
|
|
variant: "ghost",
|
|
}),
|
|
"w-9 px-0"
|
|
)}
|
|
>
|
|
<Icons.twitter className="h-5 w-5 fill-current" />
|
|
<span className="sr-only">Twitter</span>
|
|
</div>
|
|
</Link>
|
|
<ModeToggle />
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
)
|
|
}
|