Clojurescript mount + re-frame component for a district UI, that provides reagent UI component for notifications.
Add into your project.clj.
Include [district.ui.component.notification]
in your CLJS file.
This UI component assumes you have following UI modules installed in your app:
This namespace contains reagent UI component to display active (current) notification.
It subscribes to the ::notification
sub of the district-ui-notification module.
(ns my-district
(:require [reagent.core :as r]
[re-frame.core :as re-frame]
[mount.core :as mount]
[district.ui.notification]
[district.ui.notification.events :as events]
[district.ui.component.notification :as notification]))
(defn main-panel []
[:div.app
[notification/notification]])
(defn ^:export init []
(-> (mount/with-args {:district-ui-notification {:default-show-duration 1000}})
(mount/start))
(r/render [main-panel] (.getElementById js/document "app"))
(re-frame/dispatch-sync [::events/show "foobar"]))
Can you improve this documentation? These fine people already did:
fbielejec, Filip Bielejec & ginesdtEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close