protected override void OnParametersSet() { if (Dense || MudList?.Dense == true) { textTypo = Typo.body2; } else if (!Dense || !MudList?.Dense == true) { textTypo = Typo.body1; } }
public static string ToDescriptionString(this Typo val) { var attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }