chore: organize table exports
This commit is contained in:
@@ -1,27 +1,19 @@
|
||||
import TBody from "./TBody"
|
||||
import TD from "./TD"
|
||||
import TH from "./TH"
|
||||
import THead from "./THead"
|
||||
import TR from "./TR"
|
||||
|
||||
import styles from "./table.module.css"
|
||||
|
||||
function Table({ children }: React.PropsWithChildren) {
|
||||
return <table className={styles.table}>{children}</table>
|
||||
}
|
||||
|
||||
Table.THead = THead
|
||||
Table.TH = TH
|
||||
Table.TBody = TBody
|
||||
Table.TD = TD
|
||||
Table.TR = TR
|
||||
|
||||
export default Table
|
||||
|
||||
export function THead({ children }: React.PropsWithChildren) {
|
||||
return <thead className={styles.thead}>{children}</thead>
|
||||
}
|
||||
|
||||
export function TH({ children }: React.PropsWithChildren) {
|
||||
return <th className={styles.th}>{children}</th>
|
||||
}
|
||||
|
||||
export function TD({ children }: React.PropsWithChildren) {
|
||||
return <td className={styles.td}>{children}</td>
|
||||
}
|
||||
|
||||
export function TBody({ children }: React.PropsWithChildren) {
|
||||
return <tbody className={styles.tbody}>{children}</tbody>
|
||||
}
|
||||
|
||||
export function TR({ children }: React.PropsWithChildren) {
|
||||
return <tr className={styles.tr}>{children}</tr>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user