first step of page abstraction.
This commit is contained in:
@@ -102,7 +102,10 @@
|
||||
[:button.delete {:on-click (dispatch-event [::modal-closed])}]]
|
||||
[:section.modal-card-body
|
||||
body]
|
||||
(let [status (some-> confirm :status-from re-frame/subscribe deref )]
|
||||
(let [status (some-> confirm :status-from re-frame/subscribe deref )
|
||||
can-submit (if-let [can-submit (-> confirm :can-submit)]
|
||||
@(re-frame/subscribe can-submit)
|
||||
true)]
|
||||
(if foot
|
||||
[:footer.modal-card-foot
|
||||
[appearing {:visible? (= :error (:state status))
|
||||
@@ -122,7 +125,11 @@
|
||||
[:div.buttons
|
||||
(when confirm
|
||||
[:button.button {:class (conj (status/class-for status) (:class confirm) )
|
||||
:disabled (if can-submit
|
||||
false
|
||||
true)
|
||||
:on-click (:on-click confirm)}
|
||||
(:value confirm)])
|
||||
(when cancel?
|
||||
[:button.button {:on-click (dispatch-event [::modal-closed] )} "Cancel"])]]]))]])))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user