Updated ToggleableButton to support no additional attributes.

This commit is contained in:
Harrison Deng 2021-05-31 19:09:11 -05:00
parent 9e3de4b6dc
commit 065d786dd7

View File

@ -17,12 +17,5 @@
private bool state;
private string ButtonClasses
{
get
{
IReadOnlyDictionary<string, object> t = AdditionalAttributes;
return (state ? "active " : "") + (AdditionalAttributes["class"] as string);
}
}
private string ButtonClasses => (state ? "active " : null) + (AdditionalAttributes != null && AdditionalAttributes.ContainsKey("class") ? AdditionalAttributes["class"] as string : null);
}