546b0231e7
* un-daisy labels * un-daisy inputs * un-daisy input groups * fixup input * un-daisy selects * un-daisy slider * Uninstall daisy. Migrate colors * un-daisy tables * fix input error styling * lint
22 lines
506 B
TypeScript
22 lines
506 B
TypeScript
import clsx from 'clsx'
|
|
|
|
/** `<table>` with styles. Expects table html (`<thead>`, `<td>` etc) */
|
|
export const Table = (props: {
|
|
zebra?: boolean
|
|
className?: string
|
|
children: React.ReactNode
|
|
}) => {
|
|
const { className, children } = props
|
|
|
|
return (
|
|
<table
|
|
className={clsx(
|
|
'w-full whitespace-nowrap text-left text-sm text-gray-500 [&_td]:p-2 [&_th]:p-2 [&>thead]:font-bold [&>tbody_tr:nth-child(odd)]:bg-white',
|
|
className
|
|
)}
|
|
>
|
|
{children}
|
|
</table>
|
|
)
|
|
}
|