import {Card, type CardProps} from '@sanity/ui'
import type {PropsWithChildren} from 'react'
import {css, styled} from 'styled-components'
// Wrappers required because of bug with passing down "as" prop
// https://github.com/styled-components/styled-components/issues/2449
// Table
const TableWrapper = (props: CardProps = {}) => {
return
}
const StyledTable = styled(TableWrapper)(
() => css`
display: table;
width: 100%;
border-collapse: collapse;
&:not([hidden]) {
display: table;
border-collapse: collapse;
}
`,
)
type TableProps = PropsWithChildren
export function Table(props: TableProps) {
const {children, ...rest} = props
return {children}
}
// Row
const RowWrapper = (props: CardProps = {}) => {
return
}
const StyledRow = styled(RowWrapper)(
() => css`
display: table-row;
&:not([hidden]) {
display: table-row;
}
`,
)
type TableRowProps = PropsWithChildren
export function Row(props: TableRowProps) {
const {children, ...rest} = props
return {children}
}
// Cell
const CellWrapper = (props = {}) => {
return
}
const StyledCell = styled(CellWrapper)(
() => css`
display: table-cell;
&:not([hidden]) {
display: table-cell;
}
`,
)
type TableCellProps = PropsWithChildren<
CardProps & {
colSpan?: number
rowSpan?: number
}
>
export function Cell(props: TableCellProps) {
const {children, ...rest} = props
return {children}
}