feat(web): complete ticker-table refactor for listings page (TEC-3046)
- Thay mockDelta bằng getDelta30d: hiển thị "—" khi API chưa có priceDelta30d - Cải thiện row hover/active bằng design tokens (active:bg-accent/10, duration-100) - Viết 16 Vitest tests: render, sort, toggle view, filter bar, navigation Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -182,10 +182,15 @@ export function DataTable<T>({
|
||||
key={key}
|
||||
onClick={onRowClick ? () => onRowClick(row) : undefined}
|
||||
className={cn(
|
||||
'border-b border-border/60 transition-colors',
|
||||
'border-b border-border/60 transition-colors duration-100',
|
||||
dense ? 'h-row' : 'h-10',
|
||||
index % 2 === 1 && 'bg-background-surface/40',
|
||||
onRowClick && 'cursor-pointer hover:bg-background-surface',
|
||||
onRowClick && [
|
||||
'cursor-pointer',
|
||||
'hover:bg-background-surface',
|
||||
'active:bg-accent/10',
|
||||
'focus-within:bg-background-surface',
|
||||
],
|
||||
)}
|
||||
>
|
||||
{columns.map((col) => (
|
||||
|
||||
Reference in New Issue
Block a user