Skip to content

Commit 692c5b9

Browse files
authored
Merge pull request #8061 from ImMiguelP/chakra-markdowntable
Migrate MarkdownTable to Chakra
2 parents a654b63 + e200c00 commit 692c5b9

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/components/MarkdownTable.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import React from "react"
2-
import styled from "@emotion/styled"
3-
4-
const TableContainer = styled.div`
5-
overflow-x: auto;
6-
margin: 2rem 0;
7-
8-
th {
9-
border-bottom: 1px solid ${(props) => props.theme.colors.border};
10-
white-space: nowrap;
11-
}
12-
`
2+
import { Box, Table } from "@chakra-ui/react"
133

144
export interface IProps {
155
children?: React.ReactNode
166
}
177

188
const MarkdownTable: React.FC<IProps> = ({ children }) => (
19-
<TableContainer>
20-
<table>{children}</table>
21-
</TableContainer>
9+
<Box my={8}>
10+
<Table
11+
sx={{
12+
th: {
13+
borderBottom: "1px solid",
14+
borderColor: "border",
15+
whiteSpace: "nowrap",
16+
},
17+
}}
18+
>
19+
{children}
20+
</Table>
21+
</Box>
2222
)
2323

2424
export default MarkdownTable

0 commit comments

Comments
 (0)