Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active March 2, 2017 21:06
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 deque-blog/8ef557fa80f74e4a53fb5fc74776c19b to your computer and use it in GitHub Desktop.
Save deque-blog/8ef557fa80f74e4a53fb5fc74776c19b to your computer and use it in GitHub Desktop.
(defn- make-button
[on-click txt]
[:button.top-button {:on-click on-click} txt])
(defn render-top-panel
"Render the top panel:
* The restart game button
* The title of the game
* The undo button"
[turn {:keys [on-restart on-undo]}]
[:div.scores
[make-button on-restart utils/circle-arrow]
[:h1#title (title/get-title turn)]
[make-button on-undo utils/back-arrow]
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment