table tr for head

This commit is contained in:
Djeeberjr 2021-10-02 17:42:43 +02:00
parent fd688021ea
commit 91e75a2c72

View File

@ -32,7 +32,9 @@ const Table: React.FC<Props> = ({data:{headers,body}}) => {
return ( return (
<table className="w-full"> <table className="w-full">
<thead className="border-b-2 dark:border-gray-900"> <thead className="border-b-2 dark:border-gray-900">
<tr>
{headers.map((e,i)=><th key={i} className="text-left">{e.name}</th>)} {headers.map((e,i)=><th key={i} className="text-left">{e.name}</th>)}
</tr>
</thead> </thead>
<tbody className="divide-y dark:divide-gray-900"> <tbody className="divide-y dark:divide-gray-900">
{body.map((row,rowIndex)=> {body.map((row,rowIndex)=>