mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: use new table design for markdown rendering (#17530)
resolves #17502 <img width="756" alt="Screenshot 2025-04-23 at 11 26 19" src="https://github.com/user-attachments/assets/667c595c-21de-496c-8f25-3dca9f840c7c" />
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
import type { Interpolation, Theme } from "@emotion/react";
|
||||
import Link from "@mui/material/Link";
|
||||
import Table from "@mui/material/Table";
|
||||
import TableBody from "@mui/material/TableBody";
|
||||
import TableCell from "@mui/material/TableCell";
|
||||
import TableContainer from "@mui/material/TableContainer";
|
||||
import TableHead from "@mui/material/TableHead";
|
||||
import TableRow from "@mui/material/TableRow";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "components/Table/Table";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import { type FC, memo } from "react";
|
||||
import ReactMarkdown, { type Options } from "react-markdown";
|
||||
@ -90,11 +91,7 @@ export const Markdown: FC<MarkdownProps> = (props) => {
|
||||
},
|
||||
|
||||
table: ({ children }) => {
|
||||
return (
|
||||
<TableContainer>
|
||||
<Table>{children}</Table>
|
||||
</TableContainer>
|
||||
);
|
||||
return <Table>{children}</Table>;
|
||||
},
|
||||
|
||||
tr: ({ children }) => {
|
||||
@ -102,7 +99,7 @@ export const Markdown: FC<MarkdownProps> = (props) => {
|
||||
},
|
||||
|
||||
thead: ({ children }) => {
|
||||
return <TableHead>{children}</TableHead>;
|
||||
return <TableHeader>{children}</TableHeader>;
|
||||
},
|
||||
|
||||
tbody: ({ children }) => {
|
||||
|
Reference in New Issue
Block a user