27 lines
692 B
TypeScript
27 lines
692 B
TypeScript
import type { AnyDocument } from "@/lib/types";
|
|
import { FormattedText } from "../FormattedText";
|
|
import { DocumentLink } from "./DocumentLink";
|
|
|
|
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 (
|
|
<div>
|
|
<DocumentLink
|
|
childDocId={doc.id}
|
|
className="!no-underline text-slate-100 hover:underline hover:text-violet-400"
|
|
>
|
|
{title && <h4 className="font-bold">{title}</h4>}
|
|
{description && <FormattedText>{description}</FormattedText>}
|
|
</DocumentLink>
|
|
</div>
|
|
);
|
|
};
|