We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 135c267 commit 91bc4e9Copy full SHA for 91bc4e9
src/components/MarkdownTable.tsx
@@ -1,23 +1,21 @@
1
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
-`
+import { Table, TableContainer, Th } from "@chakra-ui/react"
13
14
export interface IProps {
15
children?: React.ReactNode
16
}
17
18
const MarkdownTable: React.FC<IProps> = ({ children }) => (
19
- <TableContainer>
20
- <table>{children}</table>
+ <TableContainer my={8}>
+ <Table>
+ <Th
+ borderBottom={"1px solid"}
+ borderColor={"border"}
+ whiteSpace={"nowrap"}
+ >
+ {children}
+ </Th>
+ </Table>
21
</TableContainer>
22
)
23
0 commit comments