improve table and list components with themed background

This commit is contained in:
Inhji 2023-04-08 09:54:47 +02:00
parent a15edfb01c
commit b29de407bb

View file

@ -510,8 +510,8 @@ defmodule ChiyaWeb.CoreComponents do
end end
~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 bg-white dark:bg-gray-950 pt-1 mt-10 rounded shadow">
<table class="mt-11 w-[40rem] sm:w-full"> <table class="mt-4 w-[40rem] sm:w-full">
<thead class="text-left text-[0.8125rem] leading-6 text-gray-500"> <thead class="text-left text-[0.8125rem] leading-6 text-gray-500">
<tr> <tr>
<th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%= col[:label] %></th> <th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%= col[:label] %></th>
@ -574,7 +574,7 @@ defmodule ChiyaWeb.CoreComponents do
def list(assigns) do def list(assigns) do
~H""" ~H"""
<div class="mt-14"> <div class="mt-10 bg-white dark:bg-gray-950 rounded shadow px-4">
<dl class="-my-4 divide-y divide-gray-100 dark:divide-gray-800"> <dl class="-my-4 divide-y divide-gray-100 dark:divide-gray-800">
<div :for={item <- @item} class="flex gap-4 py-4 sm:gap-8"> <div :for={item <- @item} class="flex gap-4 py-4 sm:gap-8">
<dt class="w-1/4 flex-none text-[0.8125rem] leading-6 text-gray-500 dark:text-gray-300"> <dt class="w-1/4 flex-none text-[0.8125rem] leading-6 text-gray-500 dark:text-gray-300">