Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Collapse] Implement the ability to set the collapsed height through props #8368

Conversation

jackyho112
Copy link
Contributor

@jackyho112 jackyho112 commented Sep 25, 2017

For #8235, so that the Collapse component takes a collapsedHeight prop to allow setting a custom height for the container to collapse to.

For instance,
screen shot 2017-09-24 at 6 30 06 pm

will do this:

hddcjohkhp

This is my first PR, so hopefully, my implementation looks alright. Please let me know if there is any improvement you have in mind. 😄

@oliviertassinari oliviertassinari added component: transitions This is the name of the generic UI component, not the React module! PR: needs review labels Oct 1, 2017
@oliviertassinari oliviertassinari self-assigned this Oct 2, 2017
@oliviertassinari oliviertassinari force-pushed the implement-collapsed-height-for-the-collapse-component branch 2 times, most recently from c6777d6 to ad53c57 Compare October 2, 2017 21:54
@oliviertassinari
Copy link
Member

@jackyho112 Thanks a lot for this proof of concept. I have taken the liberty to change the implementation a bit. Let me know if it looks correct.

@oliviertassinari oliviertassinari force-pushed the implement-collapsed-height-for-the-collapse-component branch from ad53c57 to 82a68f2 Compare October 2, 2017 22:04
@jackyho112
Copy link
Contributor Author

jackyho112 commented Oct 2, 2017

@oliviertassinari Thanks for helping out! That looks much simpler and cleaner. It made me realize that a lot of code I did was most likely not worth it. Anyway, look forward to contributing more! 😄

@oliviertassinari oliviertassinari merged commit 93baf08 into mui:v1-beta Oct 3, 2017
@oliviertassinari
Copy link
Member

@jackyho112 Don't worry, we need to try different things out to find the simplest solution to any problem.

@jackyho112 jackyho112 deleted the implement-collapsed-height-for-the-collapse-component branch October 3, 2017 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: transitions This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants