I have Page.razor which looks like this:
<div class="foo">bar</div>
<div class="wing">dings</div>
<button class="btn btn-primary" @onclick="HideFooClass">Hide Foo Class</button>
What C# code could be used for HideFooClass that could be modified to hide wing instead if the code was adapted?
Currently I make class a variable, fooVisibility. HideFooClass then changes the value of fooVisibility to one of a class with the CSS property visibility: hidden. I would prefer to be able to make a generic HideClass method which takes would take the string foo to replace HideFooClass so I could use it to hide the wing class.