|
1 | 1 | <template>
|
2 |
| - <table class="border-collapse table-auto w-full text-sm"> |
3 |
| - <thead :class="headingClass" class=" text-gray-800 "> |
| 2 | + <table class="border-collapse table-auto w-full text-sm bo"> |
| 3 | + <thead :class="headingClass" class=" text-primary-800 "> |
4 | 4 | <tr>
|
5 | 5 | <th class="p-2 font-normal" v-for="h in headings">{{ h.label }}</th>
|
6 | 6 | </tr>
|
7 | 7 | </thead>
|
8 |
| - <tbody class="text-gray-600"> |
| 8 | + <tbody class="text-primary-600 dark:text-primary-100"> |
9 | 9 | <tr v-for="(item,index) in items" :key="index" :class="rowClass(index)" class="transition-colors" >
|
10 |
| - <td :class="boarderClass" class=" p-2" v-for="cell in headings"> |
| 10 | + <td :class="boarderClass" class="p-2 text-primary-600 dark:text-primary-100" v-for="cell in headings"> |
11 | 11 | <slot :name="cell.field" :item="item">
|
12 | 12 | {{ item[cell.field] }}
|
13 | 13 | </slot>
|
@@ -69,17 +69,17 @@ export default {
|
69 | 69 | },
|
70 | 70 | computed: {
|
71 | 71 | headingClass() {
|
72 |
| - return 'bg-'+this.headingColor+'-200 dark:bg-'+this.headingColor+'-900 dark:text-'+this.headingColor+'-200' |
| 72 | + return 'bg-'+this.headingColor+'-200 dark:bg-'+this.headingColor+'-700 dark:text-'+this.headingColor+'-200' |
73 | 73 | },
|
74 | 74 | boarderClass() {
|
75 |
| - return this.border ? 'border border-' + this.borderColor+'-200 dark:border-'+this.borderColor+'-900': ''; |
| 75 | + return this.border ? 'border border-' + this.borderColor+'-200 dark:border-'+this.borderColor+'-700': ''; |
76 | 76 | },
|
77 | 77 | },
|
78 | 78 | methods: {
|
79 | 79 | rowClass(ndx) {
|
80 | 80 | let h = this.hover ?' hover:bg-'+this.hoverColor+'-300 dark:hover:bg-'+this.hoverColor+'-700 dark:hover:text-white':''
|
81 | 81 | if(this.selectedIndex === ndx) h = ' bg-'+this.selectColor+'-300 dark:bg-'+this.selectColor+'-400'
|
82 |
| - if(this.striped && this.selectedIndex !== ndx) return ndx % 2 !== 0 ? 'bg-'+this.stripeColor+'-100 dark:bg-'+this.stripeColor+'-800 dark:text-gray-200'+h: ' dark:text-gray-700 '+h; |
| 82 | + if(this.striped && this.selectedIndex !== ndx) return ndx % 2 !== 0 ? 'bg-'+this.stripeColor+'-100 dark:bg-'+this.stripeColor+'-800 dark:text-primary-200'+h: ' dark:text-primary-700 '+h; |
83 | 83 |
|
84 | 84 | return h+' dark:text-gray-700'
|
85 | 85 | }
|
|
0 commit comments