Skip to content

Instantly share code, notes, and snippets.

@apostolou
Created June 19, 2019 11:53
Show Gist options
  • Save apostolou/898232b4aa74c50e05b07930c0406c44 to your computer and use it in GitHub Desktop.
Save apostolou/898232b4aa74c50e05b07930c0406c44 to your computer and use it in GitHub Desktop.
clojurescript simple example dropdown / reactstrap baking-soda
(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?}
[b/DropdownToggle
{:aria-haspopup true
:caret true}
"\n Dropdown\n "]
[b/DropdownMenu
[b/DropdownItem {:header "header"} "Header"]
[b/DropdownItem "Some Action"]
[b/DropdownItem {:disabled true} "Action (disabled)"]
[b/DropdownItem {:divider true}]
[b/DropdownItem "Foo Action"]
[b/DropdownItem "Bar Action"]
[b/DropdownItem "Quo Action"]]])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment