diff --git a/AGENTS.md b/AGENTS.md index e6216c3..8c49b3f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -135,6 +135,8 @@ In development, `postgresAdapter` uses `push: true` to auto-sync schema. shadcn/ui components live in `src/components/ui/`. Use `bunx shadcn@latest add ` to add new ones. Frontend components in `src/components/frontend/`. Payload admin custom components referenced in `payload.config.ts` under `admin.components`. +**Rule**: always prefer shadcn/ui components (Dialog, Button, Input, Textarea, Select, etc.) over raw HTML elements or custom-built alternatives. Only build new components when no existing shadcn component fits the need. Do not override shadcn's default dark theme classes with custom `bg-*` `border-*` overrides — the admin panel's theme handles styling. + ## Environment - `.env` — local dev (PostgreSQL connection string + PAYLOAD_SECRET) diff --git a/src/components/admin/narrative-flow/NodeEditDialog.tsx b/src/components/admin/narrative-flow/NodeEditDialog.tsx index 70e563a..b1712a2 100644 --- a/src/components/admin/narrative-flow/NodeEditDialog.tsx +++ b/src/components/admin/narrative-flow/NodeEditDialog.tsx @@ -10,7 +10,9 @@ import { } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; import { Label } from "@/components/ui/label"; +import { PlusIcon, XIcon } from "lucide-react"; import type { Node } from "@xyflow/react"; interface NodeEditDialogProps { @@ -66,18 +68,16 @@ export const NodeEditDialog: FC = ({ value={(nodeData.title as string) ?? ""} onChange={(e) => updateField("title", e.target.value)} placeholder="Beat title" - className="bg-zinc-800 border-zinc-700" />
-