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
Post a Comment