|
1 | 1 | import { Metadata } from "next"; |
2 | 2 |
|
| 3 | +import { Separator } from "@/components/ui/separator"; |
| 4 | + |
3 | 5 | import ThemeSelectorExample from "@/components/examples/theme-selector"; |
| 6 | +import ThemeSelectorShowcase from "@/components/examples/theme-selector-showcase"; |
| 7 | + |
| 8 | +import CodeSnippet from "../code-snippet"; |
| 9 | +import CopyCommandButton from "../copy-command-button"; |
| 10 | +import InstallationCommands from "../installation-commands"; |
4 | 11 |
|
5 | 12 | export const metadata: Metadata = { |
6 | | - title: "Theme Selector", |
| 13 | + title: "8-bit Theme Selector", |
7 | 14 | description: |
8 | 15 | "A complete theme selector component with dropdown selection and code copy functionality. Includes theme context provider for managing active themes across the application.", |
9 | 16 | }; |
10 | 17 |
|
11 | 18 | export default function ThemeSelectorPage() { |
12 | 19 | return ( |
13 | | - <> |
14 | | - <div className="flex flex-col p-4 gap-5 py-10"> |
15 | | - <h1 className={`retro md:text-2xl font-bold`}>Theme Selector</h1> |
16 | | - <p className="max-w-2xl text-sm md:text-base"> |
17 | | - A complete theme selector component with dropdown selection and code |
18 | | - copy functionality. Includes theme context provider for managing |
19 | | - active themes across the application. |
20 | | - </p> |
| 20 | + <div className="flex flex-col gap-4"> |
| 21 | + <div className="flex flex-col md:flex-row items-center justify-between gap-2"> |
| 22 | + <h1 className="text-3xl font-bold">Theme Selector</h1> |
| 23 | + <CopyCommandButton |
| 24 | + copyCommand="pnpm dlx shadcn@latest add @8bitcn/theme-selector" |
| 25 | + command="pnpm dlx shadcn@latest add @8bitcn/theme-selector" |
| 26 | + /> |
21 | 27 | </div> |
22 | 28 |
|
23 | | - <div className="p-5"> |
| 29 | + <p className="text-muted-foreground"> |
| 30 | + A complete theme selector component with dropdown selection and code |
| 31 | + copy functionality. Includes theme context provider for managing active |
| 32 | + themes across the application. |
| 33 | + </p> |
| 34 | + |
| 35 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 36 | + <div className="flex items-center justify-between"> |
| 37 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 38 | + 8-bit theme selector component |
| 39 | + </h2> |
| 40 | + </div> |
| 41 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 42 | + <div className="flex flex-col items-center gap-6"> |
| 43 | + <ThemeSelectorShowcase /> |
| 44 | + </div> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + |
| 48 | + <h3 className="text-lg font-bold">Installation</h3> |
| 49 | + |
| 50 | + <Separator /> |
| 51 | + |
| 52 | + <InstallationCommands packageName="theme-selector" /> |
| 53 | + |
| 54 | + <h3 className="text-lg font-bold mt-10">Usage</h3> |
| 55 | + |
| 56 | + <Separator /> |
| 57 | + |
| 58 | + <CodeSnippet>{`import { ThemeSelector } from "@/components/theme-selector"`}</CodeSnippet> |
| 59 | + |
| 60 | + <CodeSnippet>{`<ThemeSelector />`}</CodeSnippet> |
| 61 | + |
| 62 | + <h3 className="text-lg font-bold mt-10">Examples</h3> |
| 63 | + |
| 64 | + <Separator /> |
| 65 | + |
| 66 | + <div className="mt-4"> |
24 | 67 | <ThemeSelectorExample /> |
25 | 68 | </div> |
26 | | - </> |
| 69 | + </div> |
27 | 70 | ); |
28 | 71 | } |
0 commit comments