Utilities for working with frontend views.
Utilities for working with frontend views.
(case x & clauses)Similar to clojure.core/case, but wraps the values in divs.
Values that aren't displayed will still be returned, but they'll be wrapped
in a div with :display "none" for performance.
Example:
(def tab (reagent.core/ratom ::tab-1))
(case @tab
::tab-1 [:p "tab 1"]
::tab-2 [:p "tab 2"])
=> [:div
(^{:key ::tab-1} [:div [:p "tab 1"]]
^{:key ::tab-2} [:div {:style {:display "none"}}
[:p "tab 2"]])]
Similar to `clojure.core/case`, but wraps the values in divs.
Values that aren't displayed will still be returned, but they'll be wrapped
in a div with `:display "none"` for performance.
Example:
```
(def tab (reagent.core/ratom ::tab-1))
(case @tab
::tab-1 [:p "tab 1"]
::tab-2 [:p "tab 2"])
=> [:div
(^{:key ::tab-1} [:div [:p "tab 1"]]
^{:key ::tab-2} [:div {:style {:display "none"}}
[:p "tab 2"]])]
```(gap)(gap size)Returns a 10px (by default) div.
Returns a 10px (by default) div.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |