mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-01-06 04:48:14 -05:00
21 lines
450 B
TypeScript
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>
|
|
)
|
|
}
|