Files
Compass/web/components/widgets/table.tsx
Martin Braquet ba9b3cfb06 Add pretty formatting (#29)
* Test

* Add pretty formatting

* Fix Tests

* Fix Tests

* Fix Tests

* Fix

* Add pretty formatting fix

* Fix

* Test

* Fix tests

* Clean typeckech

* Add prettier check

* Fix api tsconfig

* Fix api tsconfig

* Fix tsconfig

* Fix

* Fix

* Prettier
2026-02-20 17:32:27 +01:00

18 lines
444 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>
)
}