cssinjs / styled-jss

Styled Components on top of JSS.
http://cssinjs.org/styled-jss
MIT License
217 stars 25 forks source link

Compose React Components with styled-jss #39

Closed thupi closed 6 years ago

thupi commented 6 years ago

Why do this not work :-) ? I am used to do so in other styled component libs :-) ?

https://www.webpackbin.com/bins/-Kqj9we_BMAsxT1ISrUc

kof commented 6 years ago

Sounds like a valid use case, didn't know it doesn't

thupi commented 6 years ago

Sounds great :-)

I haven't yet looked into the implementation of styled-jss but could this be solved by passing classNames to the component if the first parameret is a React component :-) ?

lttb commented 6 years ago

hi, @thupi!

Thanks for this issue!

Composition works only with styled components now, but I think it's reasonable to implement such a behavior. I'll try to fix this as soon as possible

thupi commented 6 years ago

Hi @lttb.

Sounds realy great :-) ! There is many styled component libaries at the moment but material-ui works great with jss :-) ! I realy look forward to such a implementaion :-)

lttb commented 6 years ago

@thupi sorry for the such delay, but we've finally released this feature :)

You can check it here: https://www.webpackbin.com/bins/-KwJ9qyb46vhSTKBaqDh