Lib: Make table rows colors alternating
This commit is contained in:
@ -18,7 +18,7 @@
|
|||||||
<div class="table-container bg-white shadow">
|
<div class="table-container bg-white shadow">
|
||||||
<table class="table table-interactive table-compact bg-white">
|
<table class="table table-interactive table-compact bg-white">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-white">
|
<tr class="bg-surface-500">
|
||||||
{#each columns as col}
|
{#each columns as col}
|
||||||
<th class="!px-3">{col.label}</th>
|
<th class="!px-3">{col.label}</th>
|
||||||
{/each}
|
{/each}
|
||||||
@ -28,6 +28,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{#each data as row}
|
{#each data as row}
|
||||||
<tr
|
<tr
|
||||||
|
class="bg-surface-300"
|
||||||
onclick={async (event: Event) => {
|
onclick={async (event: Event) => {
|
||||||
if (handler) await handler(event, row.id);
|
if (handler) await handler(event, row.id);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user