intuit/CardParts

Collapsable Card Parts

juliusbtesh opened this issue · 3 comments

Is it easy to implement a collapsable/expandable card part using what we have here?

You may use the idea of CardStates in order to set different CardParts for different states. So you may have an opened state and a closed state and when you change in between it will set the currently visible CardParts to whatever you have inputted for that selected state. Let me know if you still need help or if that pointed you in the correct direction!

Thanks! I will look into this

@croossin So I gave this a try and it is a bit weird how it seems to be working.

First : It doesnt seem like I can reuse the same card part from a different state (Unless Im just not setting it properly)
Second : Is there an easy way to get an animation like the card "expanding"/"collapsing" - At the moment when I switch states it just displays the "expanded" card but it seems very weird.

Thanks!