/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import type { HTMLProps } from 'react'; import { Text } from '../typography/Text'; import { createStyles } from '@crossed/styled'; const useTable = createStyles((t) => ({ table: { base: { width: '100%', borderCollapse: 'collapse', borderWidth: 0, tableLayout: 'fixed', }, }, thead: { base: { borderTopWidth: 0, borderLeftWidth: 0, borderRightWidth: 0, borderBottomWidth: 1, borderStyle: 'solid', // borderColor: t.colors.neutral.bright, // backgroundColor: t.colors.neutral.low, }, }, tbody: { base: {} }, tr: { base: { borderTopWidth: 1, borderLeftWidth: 0, borderRightWidth: 0, borderBottomWidth: 0, borderStyle: 'solid', // borderColor: t.colors.neutral[500], }, }, td: { base: { paddingLeft: t.space.xl, paddingRight: t.space.xl, paddingTop: t.space.xl, paddingBottom: t.space.xl, }, }, th: { base: { textAlign: 'left', paddingLeft: t.space.xl, paddingRight: t.space.xl, paddingTop: t.space.xl, paddingBottom: t.space.xl, }, }, })); export const Table = (props: HTMLProps) => { return ; }; export const THead = (props: HTMLProps) => { return ; }; export const TBody = ({ children, ...props }: HTMLProps) => { const newChild = (Array.isArray(children) && children.length > 0) || children ? ( children ) : ( ); return ( {newChild} ); }; export const Tr = (props: HTMLProps) => { return ; }; (Tr as any).id = 'Table.Tr'; export const Td = (props: HTMLProps) => { return
- - -
; }; export const Th = (props: HTMLProps) => { return ; };