"use client"; import "./components/ui/tidal.css"; import { useState } from "react"; import { TidalCsvPreview, type TidalCsvView, type TidalCsvRow } from "./components/ui/csv-preview"; import "./components/ui/csv-preview.css"; const tidalExampleStyles = ".tidal-scope .csv-preview-demo {\n width: 100%;\n max-width: 1080px;\n min-width: 0;\n}\n.tidal-scope .csv-preview-note {\n font-size: 11px;\n line-height: 1.6;\n color: var(--t-muted);\n text-align: center;\n margin: 14px 8px 0;\n}"; const rows: readonly TidalCsvRow[] = [ { id: "1", rowNumber: 2, cells: { name: "Mira Chen", email: "mira@example.com", role: "Admin" }, }, { id: "2", rowNumber: 3, cells: { name: "Jon Bell", email: "jon.example.com", role: "Editor" }, issues: [ { id: "email", columnId: "email", severity: "error", message: "Enter a complete email address.", }, ], }, { id: "3", rowNumber: 4, cells: { name: "Sam Rivera", email: "sam@example.com", role: "Member" }, issues: [ { id: "role", columnId: "role", severity: "warning", message: "Member will use the default Viewer role.", }, ], }, ]; export function CsvPreviewDemo() { const [view, setView] = useState("all"); return (
( <> {shown} of {total} data rows ยท 1 error, 1 warning )} />

Sample parsed data. Filter the rows to inspect validation messages.

); } export default function AgentExample() { return (
); }