Skip to content

Commit

Permalink
fix(table): fix header density spacer
Browse files Browse the repository at this point in the history
  • Loading branch information
lecoueyl committed Aug 16, 2021
1 parent 71fefd0 commit f0d9c8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/table/Table.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<table
class="w-full"
:class="[
'w-full',
{
'overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal block sm:table': scrollable,
'relative': stickyHeader,
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/TableCell.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<td
class="last:pr-0"
:class="[
'last:pr-0',
{
// density
'py-1 pr-2': tableProps.density === 'tight',
Expand Down
6 changes: 5 additions & 1 deletion src/components/table/TableHeader.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<template>
<th
class="py-2 font-medium pr-1 last:pr-0"
class="font-medium"
:class="[
'last:pr-0',
{
// density
'py-1 pr-2': tableProps.density === 'tight',
'py-2 pr-4': tableProps.density === 'normal',
//sort
'cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out': sort,
//stickyHeader
Expand Down

0 comments on commit f0d9c8e

Please sign in to comment.