Skip to content

Instantly share code, notes, and snippets.

@claudiu-apetrei
Created August 31, 2017 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudiu-apetrei/7f335d2dfdca721bbe727dd0bfb2b868 to your computer and use it in GitHub Desktop.
Save claudiu-apetrei/7f335d2dfdca721bbe727dd0bfb2b868 to your computer and use it in GitHub Desktop.
(defui ^:once GrantOverlay
static f-core/InitialAppState
(initial-state [this params] {:grant nil :user nil})
static om/IQuery
(query [this] [{:grant (om/get-query GrantQ) :user (om/get-query UserQ)}])
static om/Ident
(ident [this props] [:overlays/by-type :grant])
static f-css/CSS
(local-rules [this] g-css)
(include-children [this] [GrantDisplay])
Object
(render [this]
(let [css (f-css/get-classnames GrantOverlay)
{:keys [grant user]} (om/props this)
{:keys [on-close]} (om/get-computed this)]
#?(:cljs (console.log "Grant Overlay grant:" grant))
(dom/div #js {:className (:container css)}
(dom/h1 #js {:className (:h1 css)} (:name user))
(dom/h1 #js {:className (:h1 css)} (:id grant))
(dom/h1 #js {:className (:h1 css)} (:age user))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment