Skip to content

Commit

Permalink
[error-modal] Fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Jul 23, 2024
1 parent cc4863b commit 7342e14
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/re_com/error_modal.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
(themed ::sub-title {:label details-title :level :level3}) text/title]
[u/part details args]

[u/part error (themed ::error args)]])
#p (u/part error (themed ::error args))])

(when footer
[u/part footer args])]})]]})]})]))
11 changes: 1 addition & 10 deletions src/re_demo/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,9 @@
:padding "0px 0px 0px 50px"
:child [(:panel (item-for-id @selected-tab-id tabs-definition))]]]]]]))) ;; the tab panel to show, for the selected tab

(defn main2 []
[rc/error-modal
{:src (at)
:what-happened "Something happened"
:implications "Implications"
:what-to-do "Do something."
:footer [:div
[rc/title :level :level3 :label :error-log]]}])

(defn ^:dev/after-load mount-root
[]
(rdom/render [main2] (get-element-by-id "app")))
(rdom/render [main] (get-element-by-id "app")))

(defn ^:export mount-demo
[]
Expand Down
20 changes: 10 additions & 10 deletions src/re_demo/modal_panel.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@
:on-click (fn []
(reset! show? true)
#_(js/setTimeout #(reset! show? false) 3000))]
(when true #_@show?
[error-modal
{:src (at)
:what-happened "Something happened"
:implications "Implications"
:what-to-do "Do something."
:footer [:div
[rc/title :level :level3 :label :error-log]]
:backdrop-on-click #(reset! show? false)
:on-close #(reset! show? false)}])]])))
(when @show?
[error-modal
{:src (at)
:what-happened "Something happened"
:implications "Implications"
:what-to-do "Do something."
:footer [:div
[rc/title :level :level3 :label :error-log]]
:backdrop-on-click #(reset! show? false)
:on-close #(reset! show? false)}])]])))
(defn panel2
[]
[v-box :src (at)
Expand Down

0 comments on commit 7342e14

Please sign in to comment.