This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns open-full-screen.core | |
(:require[goog.object :as gobj])) | |
(defn open-full-screen | |
"`element-id` is the string of the html element id of | |
the element to be displayed in fullscreen" | |
[element-id] | |
(let [e (.getElementById js/document element-id)] | |
(cond | |
(gobj/get e "requestFullscreen") (.requestFullscreen e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns dropdown-example.core | |
(:require [reagent.core :as reagent] | |
[baking-soda.core :as b])) | |
(defn dropdown-example [] | |
(let [is-open? (reagent/atom false)] | |
(fn [] | |
[b/Dropdown | |
{:toggle #(swap! is-open? not) | |
:is-open @is-open?} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns react-select.core | |
(:require [re-frame.core :as re-frame] | |
[reagent.core :as r] | |
[cljsjs.react-select])) | |
(def payment-modes ["Amex" "Visa" "Cash" "Paypal"]) | |
(def payment-options | |
(mapv zipmap (repeat [:label :value]) (mapv vector payment-modes (range 10)))) |