Files
Compass/web/components/widgets/table.tsx
2025-08-27 21:30:05 +02:00

21 lines
450 B
TypeScript

import clsx from 'clsx'
/** `<table>` with styles. Expects table html (`<thead>`, `<td>` etc) */
export const Table = (props: {
className?: string
children: React.ReactNode
}) => {
const { className, children } = props
return (
<table
className={clsx(
'text-ink-700 w-full whitespace-nowrap text-left text-sm [&>thead]:font-bold [&_td]:p-2 [&_th]:p-2',
className
)}
>
{children}
</table>
)
}