improve TableRow component
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import classNames from "classnames";
|
||||
import type { FC, ReactNode } from "react";
|
||||
import React from "react";
|
||||
|
||||
@@ -15,12 +16,16 @@ export const TableRow: FC<Props> = ({ items, id, onClick }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<tr onClick={handleClick}>
|
||||
<tr
|
||||
onClick={handleClick}
|
||||
className={classNames(
|
||||
"bg-white",
|
||||
onClick &&
|
||||
"bg-white hover:bg-gray-100 cursor-pointer transition duration-500"
|
||||
)}
|
||||
>
|
||||
{items?.map((item, index) => (
|
||||
<td
|
||||
key={index}
|
||||
className="px-5 py-5 border-b border-gray-200 bg-white text-sm"
|
||||
>
|
||||
<td key={index} className="px-5 py-5 border-b border-gray-200 text-sm">
|
||||
<p className="text-gray-900 whitespace-nowrap">{item}</p>
|
||||
</td>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user