From 03eeb012479ae6717f5e0097cad356f77bcd48ea Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Wed, 23 Apr 2025 18:02:14 +0100 Subject: [PATCH] chore: use new table design for markdown rendering (#17530) resolves #17502 Screenshot 2025-04-23 at 11 26 19 --- site/src/components/Markdown/Markdown.tsx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/site/src/components/Markdown/Markdown.tsx b/site/src/components/Markdown/Markdown.tsx index 7e9ee30246..a9bac7c6ad 100644 --- a/site/src/components/Markdown/Markdown.tsx +++ b/site/src/components/Markdown/Markdown.tsx @@ -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 = (props) => { }, table: ({ children }) => { - return ( - - {children}
-
- ); + return {children}
; }, tr: ({ children }) => { @@ -102,7 +99,7 @@ export const Markdown: FC = (props) => { }, thead: ({ children }) => { - return {children}; + return {children}; }, tbody: ({ children }) => {