css - Styling Om components -


the way style , om component based on how react handles styling. horrible mess duplicate common css rules on application there way define styles in function or similar?

(defn my-css [] {:border "1px solid #000"})  (defn my-component [state]   (dom/div #js {:classname "the-class-name"                 :style #js (my-css)})) 

i've tried using defn , def can't find way avoid

caused by: clojure.lang.exceptioninfo: javascript literal must use map or vector notation

i use:

(defn create-style [row]   {:background-color (utils/get-background-color (:task_status row)) :color (utils/get-color (:task_status row))}) 

but using "om-bootstrap".

i have #js before :style map , after. think depends on library expecting.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -