taylorSando / om-material-ui

A simple wrapper around react MaterialUI
Eclipse Public License 1.0
49 stars 7 forks source link

Howto map component docs to cljs syntax ? #2

Closed twashing closed 9 years ago

twashing commented 9 years ago

Hello,

I'm playing around with om-material-ui for aproject I'm building. But I can't find reliable mappings from the syntax, one needs to author components, versus what's in the docs. For example, I got TextField rendering. But in clojurescript, I need to write (om-material-ui.core/input). So I guessed that, because it's a canonical HMTL tag.

But I'm falling down on things like the LeftNav. This fails: (mui/left-nav "thing").

And there are other things like rendering errors, when an input is inside of a toolbar (mui/toolbar (mui/input)), etc. But that's just for illustration. I wanted to address the first case. Where can I go to see that mapping?

Thanks

twashing commented 9 years ago

I'll modify this issue. I saw the material-tags list in src/om_material_ui/core.cljx. I got (mui/left-nav) working by including menu-items.

(mui/left-nav {:menu-items [
                                           {:route "z" :text "a"}
                                           ]})

But I can't get that single menuItem to render. And the entire left-nav is overflowing past its container. Have you played around with any of these components?

Thanks

taylorSando commented 9 years ago

I haven't really played around with it. I've mostly been waiting for facebook to officially open source React Native.

twashing commented 9 years ago

Yeah, fair enough. This is the bleeding edge after all. Ok, thanks. And at least you have some usage reports.

Hth Tim