> one thing I like about what we use at work is we add the namespace to the generated class name
@lilactown yes, you can do it use label
option in Emotion, please check it https://github.com/khmelevskii/emotion-cljs#labels
@fabrao > Oh, if I can only use Button instead of antd/Button I can call Button as `MyButton` , right? Thank you I use something like this
// badge.styled.cljs
(defstyled <Badge> :div ;; antd/Badge in your case
{:display :inline-flex
:align-items :center
:border-radius 12})
// badge.core.cljs
(defnc <Badge>
[{:keys [class-name
size
view
children]}]
{:default default-props
:spec ::spec/props}
($ styled/<Badge> {:class-name class-name
:size size
:view view})
children)
I think that I will add small example with helix to the repo
how is the behavior when helix refresh?
@y.khmelevskii clj-commons/cljss
not refresh with helix
nice yeah, our defcss
just does this automatically for us
in dev mode? good idea!
I don’t have any issues with reloading helix component
Do you have channel for emotion?
(ns app.core
(:require
["react-dom" :as rdom]
[helix.dom :as d]
[helix.core :as hx :refer [$]]
["antd/es/button" :default Button]
[emotion.core :refer [defstyled]]
[app.lib :refer [defnc]]))
(defstyled Div d/div
{:color :red})
(defnc App []
($ Div "Fernando"))
(defn ^:export start
[]
(rdom/render ($ App)
(js/document.getElementById "app")))
What I´m doing wrong?
(defstyled Div d/div
----------------------^---------------------------------------------------------
Can't take value of macro helix.dom/div
--------------------------------------------------------------------------------
11 | {:color :red})
I solved with this
(defstyled Div "div"
{:color :red})
(defnc App []
($ Div "Fernando"))
also you can use keyword :div
No, I will create it
I thougth helix don´t render hiccup
@fabrao #emotion-cljs