+
+
+
+ );
+}
diff --git a/apps/client/src/components/demo/examples/index.ts b/apps/client/src/components/demo/examples/index.ts
new file mode 100644
index 0000000..7f0b425
--- /dev/null
+++ b/apps/client/src/components/demo/examples/index.ts
@@ -0,0 +1,3 @@
+export { HelloExample } from "./HelloExample";
+export { UsersExample } from "./UsersExample";
+export { PostsExample } from "./PostsExample";
diff --git a/apps/client/src/components/demo/index.ts b/apps/client/src/components/demo/index.ts
new file mode 100644
index 0000000..92c494c
--- /dev/null
+++ b/apps/client/src/components/demo/index.ts
@@ -0,0 +1,7 @@
+export { DemoCard } from "./DemoCard";
+export { LoadingSpinner, InlineSpinner } from "./LoadingSpinner";
+export { EmptyState } from "./EmptyState";
+export { ItemRow } from "./ItemRow";
+export { Avatar } from "./Avatar";
+export { StatusBadge } from "./StatusBadge";
+export { CodePreview } from "./CodePreview";
diff --git a/apps/client/src/index.css b/apps/client/src/index.css
index 22bb1ea..599a227 100644
--- a/apps/client/src/index.css
+++ b/apps/client/src/index.css
@@ -362,7 +362,7 @@
}
.card-hover:hover {
- box-shadow: 0 20px 40px -12px hsl(var(--primary) / 0.25);
+ box-shadow: 0 10px 20px -12px hsl(var(--primary) / 0.25);
}
/* Glassmorphism card */
diff --git a/apps/client/src/pages/TRPCDemoPage.tsx b/apps/client/src/pages/TRPCDemoPage.tsx
index 77d3cbf..f864a03 100644
--- a/apps/client/src/pages/TRPCDemoPage.tsx
+++ b/apps/client/src/pages/TRPCDemoPage.tsx
@@ -1,34 +1,16 @@
-import { useState } from "react";
+import { Sparkles } from "lucide-react";
import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { trpc } from "@/lib/trpc";
-import {
- Loader2,
- Plus,
- Trash2,
- Edit2,
- Check,
- X,
- Sparkles,
- Users,
- FileText,
- Zap,
-} from "lucide-react";
+ HelloExample,
+ UsersExample,
+ PostsExample,
+} from "@/components/demo/examples";
export default function TRPCDemoPage() {
return (
{/* Hero Header */}
-
+
Type-safe API Demo
@@ -40,410 +22,20 @@ export default function TRPCDemoPage() {
Experience the power of end-to-end type safety with a beautiful,
modern interface
-
+
-
+ {/* Demo Examples */}
+
-
+
{/* Footer */}
-
-
Built with 💜 using tRPC, React Query & TaylorDB