Files
dm-companion/src/components/documents/BasicRow.tsx

27 lines
552 B
TypeScript

import type { AnyDocument } from "@/lib/types";
import { Link } from "@tanstack/react-router";
export type Props = {
doc: AnyDocument;
title: string;
description?: string;
};
/**
* Renders a simple row that links to the document
*/
export const BasicRow = ({ doc, title, description }: Props) => {
return (
<li>
<Link
to="/document/$documentId"
params={{ documentId: doc.id }}
className="text-lg"
>
<h4>{title}</h4>
</Link>
{description && <p>{description}</p>}
</li>
);
};