Skip to content

Commit 9c4e0ec

Browse files
committed
Added package build
1 parent 83ac6ce commit 9c4e0ec

File tree

10 files changed

+4029
-3856
lines changed

10 files changed

+4029
-3856
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
dist

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Tailwind Vue Data Table
22

3-
<img src="tvdatatable.jpg"/>
3+
<img src="https://github.com/BitTheCat/tailwind-vue-data-table/blob/main/tvdatatable.jpg"/>
4+
5+
### Use in Vue
6+
``` js
7+
import { TVDataTable } from '@bitthecat/tailwind-vue-data-table'
8+
```
49

510
### Next additions
611
- Select row column (with checkbox)

dev/Table.vue

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</TVDataTable>
99

1010
<hr>
11-
11+
1212
<span class="text-xs">With Props</span>
1313
<TVDataTable
1414
:items="items"
@@ -93,4 +93,50 @@ const items = ref([
9393
},
9494
])
9595
96-
</script>
96+
</script>
97+
98+
<style>
99+
table {
100+
@apply min-w-full ;
101+
}
102+
103+
thead {
104+
@apply bg-gray-300 border;
105+
}
106+
107+
tr {
108+
@apply divide-x divide-y;
109+
}
110+
111+
tr:last-child {
112+
@apply border-b-0;
113+
}
114+
115+
th {
116+
@apply px-2 py-1.5 text-xs font-medium text-black uppercase;
117+
}
118+
119+
td {
120+
@apply px-2 py-1.5 align-top lg:table-cell lg:text-left lg:align-middle;
121+
}
122+
123+
td:last-child {
124+
@apply border-b-0;
125+
}
126+
127+
tbody tr, tbody {
128+
@apply px-2 py-1.5 text-left text-xs font-medium border;
129+
}
130+
131+
tbody tr:nth-child(odd) {
132+
@apply bg-gray-300/50 hover:bg-gray-400/50;
133+
}
134+
135+
tbody tr:nth-child(even) {
136+
@apply bg-gray-100/50 hover:bg-gray-400/50 ;
137+
}
138+
139+
.table-sort {
140+
@apply w-2.5 h-2.5 cursor-pointer
141+
}
142+
</style>

0 commit comments

Comments
 (0)