b2b/src/app/table/table.component.html

65 lines
1.8 KiB
HTML

<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-fixed">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="py-3 px-6">
id
</th>
<th scope="col" class="py-3 px-6">
int
</th>
<th scope="col" class="py-3 px-6">
float
</th>
<th scope="col" class="py-3 px-6">
color
</th>
<th scope="col" class="py-3 px-6">
child
</th>
</tr>
</thead>
<tbody>
<tr
class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
*ngFor="let item of itemsToShow; trackBy:trackByFn"
>
<th scope="row" class="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{{ item.id }}
</th>
<td class="py-4 px-6 w-12">
{{ item.int }}
</td>
<td class="py-4 px-6">
{{ item.float }}
</td>
<td class="py-4 px-6" [bgColor]="item.child.color">
{{ item.child.color }}
</td>
<td class="py-4 px-6">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-fixed">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="py-3 px-6">
id
</th>
<th scope="col" class="py-3 px-6">
color
</th>
</tr>
</thead>
<tbody>
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" class="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{{ item.child.id }}
</th>
<td class="py-4 px-6" [bgColor]="item.child.color">
{{ item.child.color }}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>