tweak styling

This commit is contained in:
shibao 2022-11-17 22:24:28 -05:00
parent bf235b837c
commit 821a8e223c
3 changed files with 11 additions and 12 deletions

View File

@ -7,7 +7,7 @@
.input-primary {
@apply bg-primary-900;
@apply border-primary-600 hover:border-primary-500 active:border-primary-400;
@apply border-primary-900 hover:border-primary-800 active:border-primary-700;
@apply text-primary-400;
}
@ -34,7 +34,7 @@
.btn-primary {
@apply bg-primary-900 focus:bg-primary-900 active:bg-primary-800;
@apply border-primary-600 hover:border-primary-500 active:border-primary-400;
@apply border-primary-900 hover:border-primary-800 active:border-primary-700;
@apply text-primary-400;
}
@ -59,7 +59,6 @@
.alert {
@apply bg-primary-900;
@apply border-primary-600 hover:border-primary-500 active:border-primary-400;
@apply text-primary-400;
padding: 15px;
margin-bottom: 20px;

View File

@ -71,8 +71,8 @@ defmodule MemexWeb.Components.TableComponent do
last_sort_key: initial_key,
sort_mode: initial_sort_mode
)
|> assign_new(:row_class, fn -> "bg-white" end)
|> assign_new(:alternate_row_class, fn -> "bg-gray-200" end)
|> assign_new(:row_class, fn -> "bg-primary-900" end)
|> assign_new(:alternate_row_class, fn -> "bg-primary-900" end)
{:ok, socket}
end

View File

@ -1,6 +1,6 @@
<div id={@id} class="w-full overflow-x-auto border border-gray-600 rounded-lg shadow-lg bg-black">
<table class="min-w-full table-auto text-center bg-white">
<thead class="border-b border-primary-600">
<div id={@id} class="w-full overflow-x-auto rounded-lg shadow-lg bg-primary-900">
<table class="min-w-full table-auto text-center bg-primary-900">
<thead class="border-b border-primary-800">
<tr>
<%= for %{key: key, label: label} = column <- @columns do %>
<%= if column |> Map.get(:sortable, true) do %>
@ -11,16 +11,16 @@
phx-value-sort-key={key}
phx-target={@myself}
>
<span class="underline"><%= label %></span>
<span><%= label %></span>
<%= if @last_sort_key == key do %>
<%= case @sort_mode do %>
<% :asc -> %>
<i class="fas fa-sm fa-chevron-down"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-down"></i>
<% :desc -> %>
<i class="fas fa-sm fa-chevron-up"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-up"></i>
<% end %>
<% else %>
<i class="fas fa-sm fa-chevron-up opacity-0"></i>
<i class="w-0 float-right fas fa-sm fa-chevron-up opacity-0"></i>
<% end %>
</span>
</th>