tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

react-mdl-portal-menu #391

Closed HriBB closed 8 years ago

HriBB commented 8 years ago

I wanted to learn how to render components to body in React, so I wrote a simple menu that does this. It uses "portal" technique to render itself into the body - bye bye parent overflow:hidden problems. It is also constrained to the viewport.

Here's the repo https://hribb.github.io/react-mdl-portal-menu/

And here are the examples https://hribb.github.io/react-mdl-portal-menu/

Haven't tested with npm install yet, hope it works :P Would love to get some feedback on this ;)

@tleunen you can close this, as it's not an issue. Do you accept PRs for the readme/docs?

tleunen commented 8 years ago

Indeed, for that purpose I usually use react-portal (https://github.com/tajo/react-portal) Will take a deeper look in the following days ;)

For the PR about readme/documentation, I'm always interested in these ones. Having a good doc is very important for me :)

HriBB commented 8 years ago

Yeah I tried to use react-portal, but I just could not get it to work as expected. I might revisit that. Will create a PR for the docs soon. Need to make SelectField and MultiSelectField stateless first, and use the new Chip component.

tleunen commented 8 years ago

Would you be willing to help with the v2 port? I'm seeing a lot of progress on their side and I'd like to start rebuilding react-mdl using it. I'm available on discord if you wanna talk about it :) https://discordapp.com/invite/0ZcbPKXt5bWTpxL5

HriBB commented 8 years ago

Sure! I already did a lot of reading and looked through the examples for react and it looks really great.

BTW I already rewrote the menu to use react-portal. 50% less code :) Not really sure why I did not use it in the first place ... but hey, at least now I know how to make a custom portal should I ever need it. Now I'm working on the react-mdl-extra package that will provide some extra components as the names suggest. Hopefully we wont need it for V2 :)

How long do you think it will take for MDL v2 to hit the alpha?

tleunen commented 7 years ago

Sorry for my silence once again :/ I believe they will plan for an alpha release before the end of the year. That's what I guess based on the number of open tickets.