readme-section.tsx
This file
Path
apps/web/src/features/project/readme-section.tsx
35 lines · 909 bytes · TypeScript
Last changed by
Merge build/comments-web-features into mainoscabrielbefore adoption74bfc72
History of this fileTake it
Draw every list and subject from one row, one status line, one family fan and one set of fact blocksoscabrielbefore adoption886b726
lines 1–35why, one step back1import type { FileView } from "@repo/protocol/domain/code";2import type { ProjectName } from "@repo/protocol/ids";34import { dirOf } from "../code/paths.ts";5import { RepoMarkdown } from "../markdown/markdown.tsx";67export const ReadmeSection = ({8 file,9 project,10}: {11 readonly file: FileView;12 readonly project: ProjectName;13}) => (14 <section15 aria-label={file.path}16 className="border-rule flex min-w-0 flex-col gap-3 border-t pt-4"17 data-readme={file.path}18 >19 <h2 className="text-muted-foreground text-mono font-mono font-medium">20 {file.path.split("/").at(-1)}21 </h2>22 {file.text === undefined ? (23 <p className="text-muted-foreground text-ui">24 This file is too large to show here.25 </p>26 ) : (27 <RepoMarkdown28 at={file.at}29 dir={dirOf(file.path)}30 project={project}31 source={file.text}32 />33 )}34 </section>35);