WARNING I am currently working on a complete re-write of soda-ash. I strongly urge you to not depend on this library yet. Also, the current release only covers Semantic UI’s Elements.
Semantic UI is awesome … however, at its core, you are concatenating ordered classes into a string. Soda-ash bubbles Semantic UI’s classes out of this regex-hell and softens them into clojurescript’s familiar, powerful, and unordered hash-map. Furthermore, soda-ash allows you to place this hash-map inside a reagent atom at your desired path. This means you can swap! Semantic UI classes and have your component reactively update.
The documentation has lots of devcard examples.
Put the following in the
:dependencies vector of your project.clj
[soda-ash "0.1.0-beta" :exclusions [cljsjs/react-with-addons]]
Then require soda-ash in your namespace.
(ns foo.bar (:require [soda-ash.element :as s]))
Finally, add Semantic UI to your index.html file:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css">
Next up, Collections.
lein clean lein figwheel devcards
Figwheel will automatically push cljs changes to the browser.
Wait a bit, then browse to http://localhost:3449.
To build a minified version:
lein clean lein cljsbuild once hostedcards
Then open resources/public/index.html
lein clean lein with-profile test doo phantom unit once
The above command assumes that you have phantomjs installed.
Copyright © 2016 Matthew Jaoudi
Distributed under the The MIT License (MIT).