Skip to content

Commit 91bc4e9

Browse files
committed
refactor: markdowntable to chakra
1 parent 135c267 commit 91bc4e9

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/components/MarkdownTable.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
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 { Table, TableContainer, Th } 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>
9+
<TableContainer my={8}>
10+
<Table>
11+
<Th
12+
borderBottom={"1px solid"}
13+
borderColor={"border"}
14+
whiteSpace={"nowrap"}
15+
>
16+
{children}
17+
</Th>
18+
</Table>
2119
</TableContainer>
2220
)
2321

0 commit comments

Comments
 (0)