Skip to content

Instantly share code, notes, and snippets.

@jeluard
Created August 2, 2018 09:18
Show Gist options
  • Save jeluard/1b41c8194c1658e1b6fc0bde4aa6db95 to your computer and use it in GitHub Desktop.
Save jeluard/1b41c8194c1658e1b6fc0bde4aa6db95 to your computer and use it in GitHub Desktop.
{meta
{:name "Simple Demo"
:description "A simple demo of extension"
:documentation "Nothing. Just see a text with dynamic random color."}
hooks/main.demo
{:view @views/main}
views/main
(let [{name :name} @properties]
[view {}
[text {} "Hello"]
(let [cond? @queries/random-boolean]
(if cond?
[text {:style {:color "green"}}
name]
[text {:style {:color "red"}}
name]))])}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment