Skip to content

Commit

Permalink
feat(table): add hover state for rows
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Aug 16, 2023
1 parent d5bd9eb commit b6225ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/table/UTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function onSort(column: { key: string; direction?: 'asc' | 'desc' }) {
<tbody :class="config.tbody">
<tr
v-for="(row, index) in rows" :key="index"
:class="[config.tr.base, isSelected(row) && config.tr.selected]"
:class="[config.tr.base, config.tr.hover, isSelected(row) && config.tr.selected]"
@click="emit('row-clicked', row)"
>
<td class="w-0 pl-4">
Expand Down
1 change: 1 addition & 0 deletions src/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const table = {
tr: {
base: '',
selected: 'bg-light-200 dark:bg-dark-700',
hover: 'hover:bg-light-200 hover:dark:bg-dark-700',
},
th: {
base: 'text-left font-normal',
Expand Down

0 comments on commit b6225ec

Please # to comment.