Using om.next
and sablono
, I am trying to style a button with mdl
, as seen there.
Here is what I tried in my render
method :
;; This works but misses the icon
[:input {:type "submit"
:className "mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"
:value "ok"}]
;; The following work, but I would like to avoid using a string
[:button {:className "mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"
:dangerouslySetInnerHTML {:__html "<i class=\"material-icons\">add</i>" }}]
;; All the following do not render the inside of the icon properly
[:input {:type "submit"
:className "mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"
:dangerouslySetInnerHTML {:__html [:i {:className "material-icons"} "add"]}}]
[:input {:type "submit"
:className "mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"}
[:i {:className "material-icons"} "add"]]
[:input {:type "submit"
:className "mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored"
:dangerouslySetInnerHTML {:__html ~(html [:i {:className "material-icons"} "add"])}}]