"use client"; import { Icon } from "@/components/icons"; import { Button, Notice } from "@/components/ui"; export function QrPreview({ dataUrl, content, size, error, loading, downloadDisabledReason, onDownload, downloading, }: { dataUrl: string | null; content: string | null; size: number; error: string | null; loading: boolean; downloadDisabledReason: string | null; onDownload: (format: "png" | "svg") => void; downloading: "png" | "svg" | null; }) { return (
{dataUrl ? ( /* eslint-disable-next-line @next/next/no-img-element -- Data-URL, keine Optimierung nötig oder möglich */ Vorschau des QR-Codes ) : (
{error ? "Keine Vorschau verfügbar" : "Gib Daten ein, um die Vorschau zu sehen"}
)} {loading ? ( aktualisiert … ) : null}
{error ? {error} : null} {content ? (

Kodierter Inhalt

{content}

) : null}
{downloadDisabledReason ? (

{downloadDisabledReason}

) : (

PNG mit {size} × {size} px · SVG frei skalierbar

)}
); }