public Button(string text = "", BootTheme type = BootTheme.Default, ButtonType buttonType = ButtonType.Button) : base(new HTMLButtonElement() { Type = buttonType, ClassName = "btn" + Extension.GetClassTheme(" btn-", type) }) { if (!string.IsNullOrWhiteSpace(text)) { Content.InnerHTML = text; } }
public static string GetClassTheme(string cls, BootTheme type) { if (type == BootTheme.None) { return(string.Empty); } return(cls + type.ToString("G").ToLower()); }
public Panel(BootTheme type = BootTheme.Default, params Union <string, Control, HTMLElement>[] typos) : base("panel" + Extension.GetClassTheme(" panel-", type), typos) { }