better warning behavior.A
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
[reagent.core :as r]
|
||||
[auto-ap.events :as events]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.views.utils :refer [with-keys]]))
|
||||
[auto-ap.views.utils :refer [with-keys appearing]]))
|
||||
|
||||
(defn modal [{:keys [title foot hide-event class]} & body]
|
||||
[:div.modal.is-active (cond-> {}
|
||||
@@ -43,9 +43,15 @@
|
||||
]
|
||||
:id id
|
||||
:hide-event [::events/modal-status id {:visible? false}]}
|
||||
(when error-message
|
||||
[:div.notification.is-warning error-message])
|
||||
(when warning
|
||||
[:div.notification.is-info warning])]
|
||||
[appearing {:visible? error-message
|
||||
:timeout 200
|
||||
:enter-class "appear"
|
||||
:exit-class "disappear"}
|
||||
[:div.notification.is-warning error-message]]
|
||||
[appearing {:visible? warning
|
||||
:timeout 200
|
||||
:enter-class "appear"
|
||||
:exit-class "disappear"}
|
||||
[:div.notification.is-info warning]]]
|
||||
(into (r/children (r/current-component)))
|
||||
(into [(when saving? [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]))])))
|
||||
|
||||
Reference in New Issue
Block a user