mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
hoverEffect configuration on TableRow
This commit is contained in:
@@ -11,9 +11,9 @@ export function IssuesTable({
|
|||||||
return (
|
return (
|
||||||
<Table>
|
<Table>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<TableRow>
|
<TableRow hoverEffect={false}>
|
||||||
{(columns.id == null || columns.id === true) && (
|
{(columns.id == null || columns.id === true) && (
|
||||||
<TableHead className="w-[0px] border-r">ID</TableHead>
|
<TableHead className="w-[1px] border-r">ID</TableHead>
|
||||||
)}
|
)}
|
||||||
{(columns.title == null || columns.title === true) && <TableHead>Title</TableHead>}
|
{(columns.title == null || columns.title === true) && <TableHead>Title</TableHead>}
|
||||||
{(columns.description == null || columns.description === true) && (
|
{(columns.description == null || columns.description === true) && (
|
||||||
|
|||||||
@@ -30,12 +30,17 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
function TableRow({
|
||||||
|
className,
|
||||||
|
hoverEffect = true,
|
||||||
|
...props
|
||||||
|
}: React.ComponentProps<"tr"> & { hoverEffect?: boolean }) {
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
data-slot="table-row"
|
data-slot="table-row"
|
||||||
className={cn(
|
className={cn(
|
||||||
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
"data-[state=selected]:bg-muted border-b transition-colors",
|
||||||
|
hoverEffect && "hover:bg-muted/40",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
Reference in New Issue
Block a user