+
+
+ {editingId == null ? "Knoten anlegen" : "Knoten bearbeiten"}
- ) : null}
+ {editingId != null ? (
+
ID {editingId}
+ ) : null}
+
-
-
-
- setName(e.target.value)}
- className="font-mono text-sm"
- autoComplete="off"
- placeholder="sp-migrator"
- />
-
+
+ {error ? (
+
+ {error}
+
+ ) : null}
-
-
-
setLabelPrefix(e.target.value)}
- placeholder="Projekt:"
- className="font-mono text-sm"
- autoComplete="off"
- />
-
- Vorschau
- {previewLabel ?? "—"}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
setColor(e.target.value)}
- placeholder="#3b82f6"
- className="min-w-0 flex-1 font-mono text-sm"
+ id="tt-name"
+ value={name}
+ onChange={e => setName(e.target.value)}
+ className="font-mono text-sm"
+ autoComplete="off"
+ placeholder="sp-migrator"
+ />
+
+
+
+
+
setLabelPrefix(e.target.value)}
+ placeholder="Projekt:"
+ className="font-mono text-sm"
autoComplete="off"
/>
-
setColor(e.target.value)}
- aria-label="Farbe wählen"
- />
+
+ Vorschau
+ {previewLabel ?? "—"}
+
+
+
+
+
+
+
+
+
-
+ ) : null}
-
-
-
-
+ )}
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
index 6b44ad4..33345f4 100644
--- a/src/components/ui/card.tsx
+++ b/src/components/ui/card.tsx
@@ -49,7 +49,7 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
-
+
);
}
diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx
index c70f2da..d286cb7 100644
--- a/src/components/ui/dialog.tsx
+++ b/src/components/ui/dialog.tsx
@@ -46,7 +46,7 @@ const DialogContent = React.forwardRef<
ref={ref}
data-slot="dialog-content"
className={cn(
- "fixed left-2 right-2 top-1/2 z-50 flex h-[calc(100dvh-2rem)] max-h-[calc(100dvh-2rem)] w-auto max-w-none -translate-y-1/2 flex-col gap-4 overflow-hidden rounded-lg border bg-background p-6 shadow-lg duration-200",
+ "fixed left-1/2 top-1/2 z-50 flex min-h-0 w-[calc(100vw-1.5rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-hidden rounded-lg border bg-background p-6 shadow-lg duration-200 max-h-[min(92dvh,calc(100dvh-2rem))]",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
className,
)}
diff --git a/src/index.css b/src/index.css
index 9ad5b78..e057e30 100644
--- a/src/index.css
+++ b/src/index.css
@@ -158,4 +158,32 @@ body::before {
max-width: 100%;
height: auto;
}
+
+ /* Snippet-Karten: etwas dichter, Fokus auf Fließtext */
+ .snippet-md-card-wrap .snippet-md {
+ font-size: 0.8125rem;
+ line-height: 1.55;
+ }
+
+ .snippet-md-card-wrap .snippet-md :where(p) {
+ margin-block: 0.375rem;
+ }
+
+ .snippet-md-card-wrap .snippet-md :where(p:first-child) {
+ margin-block-start: 0;
+ }
+
+ .snippet-md-card-wrap .snippet-md :where(p:last-child) {
+ margin-block-end: 0;
+ }
+
+ .snippet-md-card-wrap .snippet-md :where(h1, h2, h3) {
+ margin-block-start: 0.5rem;
+ margin-block-end: 0.25rem;
+ }
+
+ .snippet-md-card-wrap .snippet-md :where(pre) {
+ margin-block: 0.375rem;
+ padding: 0.5rem;
+ }
}