File tree Expand file tree Collapse file tree 9 files changed +62
-72
lines changed
apps/landing/src/components Expand file tree Collapse file tree 9 files changed +62
-72
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ import Markdown from 'react-markdown'
44import { _components } from '@/mdx-components'
55
66import { CustomCodeBlock } from './mdx/components/CustomCodeBlock'
7- import { TableBody } from './TableBody'
8- import { TableCell } from './TableCell'
9- import { TableHead } from './TableHead'
10- import { TableHeaderCell } from './TableHeaderCell'
11- import { TableRoot } from './TableRoot'
12- import { TableRow } from './TableRow'
7+ import {
8+ Table ,
9+ TableBody ,
10+ TableCell ,
11+ TableHead ,
12+ TableHeaderCell ,
13+ TableRow ,
14+ } from './mdx/components/Table'
1315
1416interface ComponentProp {
1517 property : string
@@ -39,7 +41,7 @@ export const PropsTable = async (props: PropTableProps) => {
3941 const { componentProps } = props
4042
4143 return (
42- < TableRoot border = { 0 } >
44+ < Table border = { 0 } >
4345 < TableHead >
4446 < TableRow >
4547 < TableHeaderCell > Prop</ TableHeaderCell >
@@ -83,6 +85,6 @@ export const PropsTable = async (props: PropTableProps) => {
8385 ) ,
8486 ) }
8587 </ TableBody >
86- </ TableRoot >
88+ </ Table >
8789 )
8890}
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function CustomCodeBlock({ children }: { children: string }) {
44 return (
55 < Box
66 as = "code"
7- bg = "var(-- containerBackground) "
7+ bg = "$ containerBackground"
88 borderRadius = "0.25rem"
99 color = "var(--text)"
1010 padding = "0.25rem"
Original file line number Diff line number Diff line change 1+ import { Box } from '@devup-ui/react'
2+ import { type ComponentProps } from 'react'
3+
4+ export const Table = ( { ...props } : ComponentProps < 'table' > ) => {
5+ return (
6+ < Box borderRadius = "0.5rem" overflow = "hidden" >
7+ < Box { ...props } as = "table" borderCollapse = "collapse" borderSpacing = { 0 } />
8+ </ Box >
9+ )
10+ }
11+
12+ export const TableBody = ( { ...props } : ComponentProps < 'tbody' > ) => {
13+ return < Box { ...props } as = "tbody" />
14+ }
15+
16+ export const TableCell = ( { ...props } : ComponentProps < 'th' > ) => {
17+ return < Box { ...props } as = "td" padding = "0.5rem 1rem" />
18+ }
19+
20+ export const TableHead = ( { ...props } : ComponentProps < 'thead' > ) => {
21+ return (
22+ < Box
23+ { ...props }
24+ as = "thead"
25+ selectors = { {
26+ '& tr' : {
27+ bg : '$cardBg' ,
28+ } ,
29+ } }
30+ />
31+ )
32+ }
33+
34+ export const TableHeaderCell = ( { ...props } : ComponentProps < 'th' > ) => {
35+ return < Box { ...props } as = "th" padding = "0.5rem 1rem" textAlign = "left" />
36+ }
37+
38+ export const TableRow = ( { ...props } : ComponentProps < 'tr' > ) => {
39+ return (
40+ < Box
41+ { ...props }
42+ as = "tr"
43+ borderBottom = "1px solid var(--border, #E4E4E4)"
44+ selectors = { {
45+ '& + &:last-of-type' : {
46+ borderBottom : 'none' ,
47+ } ,
48+ } }
49+ />
50+ )
51+ }
You can’t perform that action at this time.
0 commit comments