Adjust dynamic table styles

This commit is contained in:
Jonatan Kłosko 2021-06-21 14:53:13 +02:00
parent 13e3d30ef6
commit 258c91be8c

View file

@ -89,10 +89,10 @@ defmodule LivebookWeb.Output.TableDynamicLive do
</p> </p>
<% else %> <% else %>
<!-- Data table --> <!-- Data table -->
<div class="shadow-xl-center rounded-lg"> <div class="shadow-xl-center rounded-lg max-w-full overflow-y-auto tiny-scrollbar">
<table class="w-full"> <table class="w-full">
<thead class="text-left"> <thead class="text-left">
<tr class="border-b border-gray-200"> <tr class="border-b border-gray-200 whitespace-nowrap">
<%= for {column, idx} <- Enum.with_index(@columns) do %> <%= for {column, idx} <- Enum.with_index(@columns) do %>
<th class="py-3 px-6 text-gray-700 font-smibold <%= if(:sorting in @features, do: "cursor-pointer", else: "pointer-events-none") %>" <th class="py-3 px-6 text-gray-700 font-smibold <%= if(:sorting in @features, do: "cursor-pointer", else: "pointer-events-none") %>"
phx-click="column_click" phx-click="column_click"
@ -109,7 +109,7 @@ defmodule LivebookWeb.Output.TableDynamicLive do
</thead> </thead>
<tbody class="text-gray-500"> <tbody class="text-gray-500">
<%= for row <- @rows do %> <%= for row <- @rows do %>
<tr class="border-b border-gray-200 last:border-b-0 hover:bg-gray-50"> <tr class="border-b border-gray-200 last:border-b-0 hover:bg-gray-50 whitespace-nowrap">
<%= for column <- @columns do %> <%= for column <- @columns do %>
<td class="py-3 px-6"> <td class="py-3 px-6">
<%= to_string(row.fields[column.key]) %> <%= to_string(row.fields[column.key]) %>