Skip to content

Instantly share code, notes, and snippets.

@sli
Last active October 3, 2019 03:40
Show Gist options
  • Save sli/b9dfd9a7306c65519cab04523777f467 to your computer and use it in GitHub Desktop.
Save sli/b9dfd9a7306c65519cab04523777f467 to your computer and use it in GitHub Desktop.
Blueprint.js for CLJS
(ns beard-oil.lib.blueprint.core
(:require ["@blueprintjs/core" :as bpc]
[camel-snake-kebab.core :refer [->kebab-case-keyword]]
[camel-snake-kebab.extras :refer [transform-keys]]))
(def ^:private constant
(comp
(partial transform-keys ->kebab-case-keyword)
js->clj))
(defn ^:private component
[c]
#(vec (concat [:> c] %&)))
(def alignment
(constant bpc/Alignment))
(def boundary
(constant bpc/Boundary))
(def classes
(constant bpc/Classes))
(def colors
(constant bpc/Colors))
(def elevation
(constant bpc/Elevation))
(def intent
(constant bpc/Intent))
(def interaction-kind
(constant bpc/HandleInteractionKind))
(def key-codes
(constant bpc/Keys))
(def position
(constant bpc/Position))
(def popover-position
(constant bpc/PopoverPosition))
(def breadcrumbs (component bpc/Breadcrumbs))
(def button (component bpc/Button))
(def anchor-button (component bpc/AnchorButton))
(def button-group (component bpc/ButtonGroup))
(def callout (component bpc/Callout))
(def card (component bpc/Card))
(def collapse (component bpc/Collapse))
(def collapsable-list (component bpc/CollapsableList))
(def divider (component bpc/Divider))
(def editable-text (component bpc/EditableText))
(def h1 (component bpc/H1))
(def h2 (component bpc/H2))
(def h3 (component bpc/H3))
(def h4 (component bpc/H4))
(def h5 (component bpc/H5))
(def h6 (component bpc/H6))
(def blockquote (component bpc/Blockquote))
(def code (component bpc/Code))
(def pre (component bpc/Pre))
(def ul (component bpc/UL))
(def ol (component bpc/OL))
(def table (component bpc/HTMLTable))
(def hotkey (component bpc/Hotkey))
(def hotkeys (component bpc/Hotkeys))
(def icon (component bpc/Icon))
(def menu (component bpc/Menu))
(def menu-item (component bpc/MenuItem))
(def menu-divider (component bpc/MenuDivider))
(def navbar (component bpc/Navbar))
(def non-ideal-state (component bpc/NonIdealState))
(def overflow-list (component bpc/OverflowState))
(def panel-stack (component bpc/PanelStack))
(def progress-bar (component bpc/ProgressBar))
(def resize-sensor (component bpc/ResizeSensor))
(def spinner (component bpc/Spinner))
(def tabs (component bpc/Tabs))
(def tab (component bpc/Tab))
(def tab-expander (component bpc/Expander))
(def tag (component bpc/Tag))
(def text (component bpc/Text))
(def tree (component bpc/Tree))
(def form-group (component bpc/FormGroup))
(def control-group (component bpc/ControlGroup))
(def input-group (component bpc/InputGroup))
(def label (component bpc/Label))
(def checkbox (component bpc/Checkbox))
(def radio-group (component bpc/RadioGroup))
(def radio (component bpc/Radio))
(def select (component bpc/HTMLSelect))
(def slider (component bpc/Slider))
(def range-slider (component bpc/RangeSlider))
(def multi-slider (component bpc/MultiSlider))
(def handle (component bpc/Handle))
(def switch (component bpc/Switch))
(def file-input (component bpc/FileInput))
(def numeric-input (component bpc/NumericInput))
(def tag-input (component bpc/TagInput))
(def overlay (component bpc/Overlay))
(def portal (component bpc/Portal))
(def alert (component bpc/Alert))
(def dialog (component bpc/Dialog))
(def drawer (component bpc/Drawer))
(def toaster (component bpc/Toaster))
(def tooltip (component bpc/Tooltip))
(def popover
"Popover component. The :content and :target props do not work as expected. Pass target and contents as children, in that order."
(component bpc/Popover))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment