A simple encapsulation of reagent and semantic-UI.
The original intention is when I writing component with reagent and semantic-ui, like this:
[:ui.primary.icon.button "..."]
It's to hard to modifiy classes :). So I make it into:
[Button
{:s [:primary :icon]
:tag :div}
"..."]
Easy to change classes :blush:.
Add this to you dependencies in your project.clj
:
[semagent "0.3.3"]
Then:
(:require [reagent.core :as r]
[semagent.core :as s])
Put classes in {:s :keyword}
or {:s [:keyword1 :keyword2]}
, with the keyword style:
[Buttons {:s :vertical}
[Button {:s :red} "un"]
[Button {:s :primary} "or"]
[Button {:s :positive} "deux"]]
Change default tag with :tag + :keyword, like:
[Button
{:s [:primary :icon]
:tag :div}
"..."]
Whether to insert ui class:
[Menu
{:s :right
:ui? false}
"..."]
Copyright © 2017 g1eny0ung
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation? These fine people already did:
G1enY0ung, g1eny0ung & Yue YangEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close