How does Google treat hidden content which becomes visible when clicking a button?

How does Google treat hidden content which becomes visible when clicking a button? Does it look spammy if most of the text is in such a section? (e.g. simple…