lambdaisland / ornament

Clojure Styled Components
Mozilla Public License 2.0
118 stars 13 forks source link

ClojureScript: handle inheritance correctly #7

Closed plexus closed 2 years ago

plexus commented 2 years ago

Handle the case where an ornament component is used as the tagname of another component, in ClojureScript. We need to find the parent component in our registry, for which we need to expand the symbol to be fully qualified. In Clojure we can do this via inspection of namespaces and vars, in ClojureScript we get (:ns &env) and can work with that.

(o/defstyle foo x/bar ,,,)

Also adds some more docs and examples of how to set things up in a shadow-cljs project.