Fixes modal, but users still have to say h-full on every element leading to the card

This commit is contained in:
2023-10-25 12:43:00 -07:00
parent b4ea51df84
commit deaad7513c
7 changed files with 106 additions and 70 deletions

View File

@@ -5,19 +5,16 @@
(defn modal- [params & children]
[:div (-> params
(update :class #(-> %
(or "max-w-4xl w-1/4 overflow-visible")
(hh/add-class "h-min")))
(assoc "@click.outside" "open=false"))
(assoc "@click.outside" "open=false")
(update :class (fnil hh/add-class "") "w-full h-full"))
children])
(defn modal-card- [params header content footer]
[:div#modal-card (update params
:class (fn [c] (-> c
(or "w-full")
(or "w-full p-4 h-full")
)))
[:div {:class "bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content w-full flex flex-col max-h-[80vh]"}
[:div {:class "bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content w-full flex flex-col h-full"}
[:div {:class "flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600 shrink-0"} header]
[:div {:class "px-6 space-y-6 overflow-y-scroll w-full shrink"}
#_[:div.bg-green-300.w-full.h-64

View File

@@ -109,7 +109,7 @@ c.clearChoices();
[:div {:class "w-3 h-3 m-1 inline ml-1 justify-self-end text-gray-500 self-center"}
svg/drop-down]]]
[:ul.dropdown-contents {:class "absolute bg-gray-50 dark:bg-gray-600 rounded-lg shadow-lg py-1 w-max z-10 mt-1"
[:ul.dropdown-contents {:class "absolute bg-gray-50 dark:bg-gray-600 rounded-lg shadow-lg py-1 w-max z-50 mt-1"
"@keydown.escape" "open = false; value = {value: '', label: '' }"
"x-transition:enter" "ease-[cubic-bezier(.3,2.3,.6,1)] duration-200"
"x-transition:enter-start" "!opacity-0 !mt-0"