ITs quite a large table. For previews just do a small sample.
Browse files
components/documents-table.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
class DocumentsTable extends HTMLElement {
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
|
@@ -6,9 +7,10 @@ class DocumentsTable extends HTMLElement {
|
|
| 6 |
table {
|
| 7 |
width: 100%;
|
| 8 |
border-collapse: collapse;
|
|
|
|
| 9 |
}
|
| 10 |
th, td {
|
| 11 |
-
padding:
|
| 12 |
text-align: left;
|
| 13 |
border-bottom: 1px solid #e5e7eb;
|
| 14 |
}
|
|
@@ -20,6 +22,28 @@ class DocumentsTable extends HTMLElement {
|
|
| 20 |
tr:hover {
|
| 21 |
background-color: #f3f4f6;
|
| 22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
</style>
|
| 24 |
<table>
|
| 25 |
<thead>
|
|
@@ -33,19 +57,31 @@ class DocumentsTable extends HTMLElement {
|
|
| 33 |
<tbody>
|
| 34 |
<tr>
|
| 35 |
<td>1</td>
|
| 36 |
-
<td>Research Paper
|
| 37 |
<td>PDF</td>
|
| 38 |
<td>2023-05-15</td>
|
| 39 |
</tr>
|
| 40 |
<tr>
|
| 41 |
<td>2</td>
|
| 42 |
-
<td>
|
| 43 |
<td>DOCX</td>
|
| 44 |
<td>2023-06-22</td>
|
| 45 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
</tbody>
|
| 47 |
</table>
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
}
|
| 51 |
|
|
|
|
| 1 |
+
|
| 2 |
class DocumentsTable extends HTMLElement {
|
| 3 |
connectedCallback() {
|
| 4 |
this.attachShadow({ mode: 'open' });
|
|
|
|
| 7 |
table {
|
| 8 |
width: 100%;
|
| 9 |
border-collapse: collapse;
|
| 10 |
+
font-size: 0.875rem;
|
| 11 |
}
|
| 12 |
th, td {
|
| 13 |
+
padding: 10px 12px;
|
| 14 |
text-align: left;
|
| 15 |
border-bottom: 1px solid #e5e7eb;
|
| 16 |
}
|
|
|
|
| 22 |
tr:hover {
|
| 23 |
background-color: #f3f4f6;
|
| 24 |
}
|
| 25 |
+
.sample-notice {
|
| 26 |
+
font-size: 0.75rem;
|
| 27 |
+
color: #6b7280;
|
| 28 |
+
margin-top: 8px;
|
| 29 |
+
}
|
| 30 |
+
.pagination {
|
| 31 |
+
display: flex;
|
| 32 |
+
justify-content: space-between;
|
| 33 |
+
margin-top: 16px;
|
| 34 |
+
align-items: center;
|
| 35 |
+
}
|
| 36 |
+
.pagination-button {
|
| 37 |
+
padding: 6px 12px;
|
| 38 |
+
border: 1px solid #e5e7eb;
|
| 39 |
+
border-radius: 4px;
|
| 40 |
+
background: white;
|
| 41 |
+
cursor: pointer;
|
| 42 |
+
}
|
| 43 |
+
.pagination-button:disabled {
|
| 44 |
+
opacity: 0.5;
|
| 45 |
+
cursor: not-allowed;
|
| 46 |
+
}
|
| 47 |
</style>
|
| 48 |
<table>
|
| 49 |
<thead>
|
|
|
|
| 57 |
<tbody>
|
| 58 |
<tr>
|
| 59 |
<td>1</td>
|
| 60 |
+
<td>Research Paper on Cognitive Behavior</td>
|
| 61 |
<td>PDF</td>
|
| 62 |
<td>2023-05-15</td>
|
| 63 |
</tr>
|
| 64 |
<tr>
|
| 65 |
<td>2</td>
|
| 66 |
+
<td>Patient Session Notes</td>
|
| 67 |
<td>DOCX</td>
|
| 68 |
<td>2023-06-22</td>
|
| 69 |
</tr>
|
| 70 |
+
<tr>
|
| 71 |
+
<td>3</td>
|
| 72 |
+
<td>Case Study Analysis</td>
|
| 73 |
+
<td>PDF</td>
|
| 74 |
+
<td>2023-07-10</td>
|
| 75 |
+
</tr>
|
| 76 |
</tbody>
|
| 77 |
</table>
|
| 78 |
+
<div class="sample-notice">Showing sample of 3 records. View full table for complete data.</div>
|
| 79 |
+
<div class="pagination">
|
| 80 |
+
<button class="pagination-button" disabled>Previous</button>
|
| 81 |
+
<span>Page 1 of 14</span>
|
| 82 |
+
<button class="pagination-button">Next</button>
|
| 83 |
+
</div>
|
| 84 |
+
`;
|
| 85 |
}
|
| 86 |
}
|
| 87 |
|