Modals and API calls working for admin tab
This commit is contained in:
30
src/components/table/TableHead.tsx
Normal file
30
src/components/table/TableHead.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import clsx from "clsx";
|
||||
|
||||
|
||||
export default function TableHead({
|
||||
headElements
|
||||
}:{
|
||||
headElements: React.ReactNode[];
|
||||
}){
|
||||
return (
|
||||
<thead>
|
||||
<tr>
|
||||
{
|
||||
headElements.map((element, index) => (
|
||||
<th
|
||||
key={index}
|
||||
className={clsx(
|
||||
{
|
||||
"pl-2": index === 0,
|
||||
"pr-2": index === headElements.length - 1
|
||||
}
|
||||
)}
|
||||
>
|
||||
{element}
|
||||
</th>
|
||||
))
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user