Use classes instead of style blocks for showing/hiding

This is potentially more flexible, and is intuitively what I expected the class parameter to do.

Useful when the visibility of an element is derived not only from its expanded/collapsed state, but another factor such as a media query, too.

I've not used component very much so not sure if this is idiomatic. :eyes: