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