|
1 | | -import * as React from "react" |
2 | | -import { OpenInV0Button } from "@/components/open-in-v0-button" |
3 | | -import { HelloWorld } from "@/registry/new-york/blocks/hello-world/hello-world" |
4 | | -import { ExampleForm } from "@/registry/new-york/blocks/example-form/example-form" |
5 | | -import PokemonPage from "@/registry/new-york/blocks/complex-component/page" |
6 | | -import { ExampleCard } from "@/registry/new-york/blocks/example-with-css/example-card" |
| 1 | +import { OpenInV0Button } from "@/components/open-in-v0-button"; |
| 2 | +import { HelloWorld } from "@/registry/new-york/blocks/hello-world/hello-world"; |
| 3 | +import { ExampleForm } from "@/registry/new-york/blocks/example-form/example-form"; |
| 4 | +import PokemonPage from "@/registry/new-york/blocks/complex-component/page"; |
| 5 | +import { ExampleCard } from "@/registry/new-york/blocks/example-with-css/example-card"; |
| 6 | +import { BadgeBarExample } from "@/registry/new-york/blocks/badge-bar/example"; |
| 7 | +import { PagerExample } from "@/registry/new-york/blocks/pager/example"; |
| 8 | +import { ImagePreviewExample } from "@/registry/new-york/blocks/image-preview/example"; |
| 9 | +import { FilePreviewExample } from "@/registry/new-york/blocks/file-preview/example"; |
| 10 | +import { ScrollBoundaryExample } from "@/registry/new-york/blocks/scroll-boundary/example"; |
| 11 | +import { ScrollListExample } from "@/registry/new-york/blocks/scroll-list/example"; |
7 | 12 | // This page displays items from the custom registry. |
8 | 13 | // You are free to implement this with your own design as needed. |
9 | 14 |
|
@@ -64,7 +69,83 @@ export default function Home() { |
64 | 69 | <ExampleCard /> |
65 | 70 | </div> |
66 | 71 | </div> |
| 72 | + |
| 73 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 74 | + <div className="flex items-center justify-between"> |
| 75 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 76 | + A component for displaying a list of badges with optional click |
| 77 | + and delete handlers. |
| 78 | + </h2> |
| 79 | + <OpenInV0Button name="badge-bar" className="w-fit" /> |
| 80 | + </div> |
| 81 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 82 | + <BadgeBarExample /> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 87 | + <div className="flex items-center justify-between"> |
| 88 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 89 | + A pagination component with page size and page index controls. |
| 90 | + </h2> |
| 91 | + <OpenInV0Button name="pager" className="w-fit" /> |
| 92 | + </div> |
| 93 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 94 | + <PagerExample /> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | + |
| 98 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 99 | + <div className="flex items-center justify-between"> |
| 100 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 101 | + An image preview component with modal viewing and download |
| 102 | + functionality. |
| 103 | + </h2> |
| 104 | + <OpenInV0Button name="image-preview" className="w-fit" /> |
| 105 | + </div> |
| 106 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 107 | + <ImagePreviewExample /> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + |
| 111 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 112 | + <div className="flex items-center justify-between"> |
| 113 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 114 | + A file preview component supporting images, audio, video, and |
| 115 | + documents. |
| 116 | + </h2> |
| 117 | + <OpenInV0Button name="file-preview" className="w-fit" /> |
| 118 | + </div> |
| 119 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 120 | + <FilePreviewExample /> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + |
| 124 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 125 | + <div className="flex items-center justify-between"> |
| 126 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 127 | + A component that detects when scroll reaches edges using |
| 128 | + IntersectionObserver. |
| 129 | + </h2> |
| 130 | + <OpenInV0Button name="scroll-boundary" className="w-fit" /> |
| 131 | + </div> |
| 132 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 133 | + <ScrollBoundaryExample /> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + |
| 137 | + <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px] relative"> |
| 138 | + <div className="flex items-center justify-between"> |
| 139 | + <h2 className="text-sm text-muted-foreground sm:pl-3"> |
| 140 | + An infinite scroll list component using MobX for state management. |
| 141 | + </h2> |
| 142 | + <OpenInV0Button name="scroll-list" className="w-fit" /> |
| 143 | + </div> |
| 144 | + <div className="flex items-center justify-center min-h-[400px] relative"> |
| 145 | + <ScrollListExample /> |
| 146 | + </div> |
| 147 | + </div> |
67 | 148 | </main> |
68 | 149 | </div> |
69 | | - ) |
| 150 | + ); |
70 | 151 | } |
0 commit comments