Skip to content

Commit

Permalink
notebook move in
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 14, 2024
1 parent 7dac89e commit 522ae25
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ui-keybindings/resources/demo/notebook/dialog.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(ns demo.notebook.dialog
(:require
[frontend.dialog :refer [dialog-show]]))

(str *ns*)

; dialogs can be closed with ESC

(dialog-show [:h1.bg-blue-300.p-5 "dummy dialog"])

(defn my-dialog []
[:div
{:style {:background-color "white"
:padding "16px"
:border-radius "6px"
:text-align "center"}} "Hello modal!"])

(dialog-show (my-dialog))
11 changes: 11 additions & 0 deletions ui-keybindings/resources/demo/notebook/notify.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(ns demo.notebook.notify
(:require
[frontend.notification :refer [show-notification]]))

(show-notification :info [:span.bg-blue-300.inline "the sky is blue!"] 1000)

(show-notification :warning "shipping fee charged is below cost!")

(show-notification :error
[:span "its " [:span.bg-red-300 "raining"] "in Panama!"]
0)

0 comments on commit 522ae25

Please # to comment.