|
|
@ -537,7 +537,7 @@ defmodule DecentralisedBookIndexWeb.CoreComponents do
|
|
|
|
|
|
|
|
|
|
|
|
~H"""
|
|
|
|
~H"""
|
|
|
|
<div class="overflow-y-auto px-4 sm:overflow-visible sm:px-0 ">
|
|
|
|
<div class="overflow-y-auto px-4 sm:overflow-visible sm:px-0 ">
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 relative shadow-md sm:rounded-lg overflow-hidden">
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 relative shadow-md sm:rounded-lg overflow-hidden">
|
|
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
|
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th :for={col <- @col} class="p-4 font-normal">{col[:label]}</th>
|
|
|
|
<th :for={col <- @col} class="p-4 font-normal">{col[:label]}</th>
|
|
|
@ -549,9 +549,9 @@ defmodule DecentralisedBookIndexWeb.CoreComponents do
|
|
|
|
<tbody
|
|
|
|
<tbody
|
|
|
|
id={@id}
|
|
|
|
id={@id}
|
|
|
|
phx-update={match?(%Phoenix.LiveView.LiveStream{}, @rows) && "stream"}
|
|
|
|
phx-update={match?(%Phoenix.LiveView.LiveStream{}, @rows) && "stream"}
|
|
|
|
class="relative divide-y divide-zinc-100 border-zinc-200 text-sm leading-6 text-zinc-700"
|
|
|
|
class="relative divide-zinc-100 text-sm leading-6 text-zinc-700"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<tr :for={row <- @rows} id={@row_id && @row_id.(row)} class=" bg-white shadow-md dark:bg-gray-800 border-b dark:border-gray-600 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-700">
|
|
|
|
<tr :for={row <- @rows} id={@row_id && @row_id.(row)} class=" bg-white shadow-md dark:bg-gray-800 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-700">
|
|
|
|
<td
|
|
|
|
<td
|
|
|
|
:for={{col, i} <- Enum.with_index(@col)}
|
|
|
|
:for={{col, i} <- Enum.with_index(@col)}
|
|
|
|
phx-click={@row_click && @row_click.(row)}
|
|
|
|
phx-click={@row_click && @row_click.(row)}
|
|
|
|