mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 07:34:11 +00:00
73 lines
2.3 KiB
TypeScript
73 lines
2.3 KiB
TypeScript
import { Metadata } from "next"
|
|
import Link from "next/link"
|
|
import { ChevronRight } from "lucide-react"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
import { buttonVariants } from "@/components/ui/button"
|
|
import { Separator } from "@/components/ui/separator"
|
|
import { ExamplesNav } from "@/components/examples-nav"
|
|
import {
|
|
PageHeader,
|
|
PageHeaderDescription,
|
|
PageHeaderHeading,
|
|
} from "@/components/page-header"
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Examples",
|
|
description: "Check out some examples app built using the components.",
|
|
}
|
|
|
|
interface ExamplesLayoutProps {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
export default function ExamplesLayout({ children }: ExamplesLayoutProps) {
|
|
return (
|
|
<>
|
|
<div className="container relative pb-10">
|
|
<PageHeader className="page-header">
|
|
<Link
|
|
href="/docs/components/data-table"
|
|
className="inline-flex items-center rounded-lg bg-muted px-3 py-1 text-sm font-medium"
|
|
>
|
|
🎉 <Separator className="mx-2 h-4" orientation="vertical" />{" "}
|
|
Introducing Table and Data Table{" "}
|
|
<ChevronRight className="ml-1 h-4 w-4" />
|
|
</Link>
|
|
<PageHeaderHeading className="hidden md:block">
|
|
Check out some examples.
|
|
</PageHeaderHeading>
|
|
<PageHeaderHeading className="md:hidden">Examples</PageHeaderHeading>
|
|
<PageHeaderDescription>
|
|
Dashboard, cards, authentication. Some examples built using the
|
|
components. Use this as a guide to build your own.
|
|
</PageHeaderDescription>
|
|
<section className="flex w-full items-center space-x-4 pb-8 pt-4 md:pb-10">
|
|
<Link
|
|
href="/docs"
|
|
className={cn(buttonVariants(), "rounded-[6px]")}
|
|
>
|
|
Get Started
|
|
</Link>
|
|
<Link
|
|
href="/components"
|
|
className={cn(
|
|
buttonVariants({ variant: "outline" }),
|
|
"rounded-[6px]"
|
|
)}
|
|
>
|
|
Components
|
|
</Link>
|
|
</section>
|
|
</PageHeader>
|
|
<section>
|
|
<ExamplesNav />
|
|
<div className="overflow-hidden rounded-[0.5rem] border bg-background shadow-xl">
|
|
{children}
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|