public static HtmlString Button(string caption, Enums.ButtonStyle style, Enums.ButtonSize size) { if (size != Enums.ButtonSize.Normal) { return(new HtmlString( $"<button type=\"button\" class=\"btn btn-{style.ToString().ToLower()} btn-{ToBootstrapSize(size)}\">{caption}</button>")); } return(new HtmlString( $"<button type=\"button\" class=\"btn btn-{style.ToString().ToLower()}\">{caption}</button>")); }
public static HtmlString Button(string caption, Enums.ButtonStyle style, Enums.ButtonSize size) { if (size != Enums.ButtonSize.Normal) { return(new HtmlString( $"<button type='button' class='btn btn-{style.ToString().ToLower()} btn-{ ToBootstrapSize(size) }'>{caption}</button>" )); } return(new HtmlString( $"<button type='button' class='btn btn-{style.ToString().ToLower()}'>{caption}" + $"<span class='fa fa-adn'></span></button>" )); }
public static IHtmlContent BootstrapButton(this IHtmlHelper helper, string caption, Enums.ButtonStyle style, Enums.ButtonSize size) { if (size != Enums.ButtonSize.Normal) { return(new HtmlString(string.Format("<button type=\"button\" class=\"btn btn-{0} btn-{1}\">{2}</button>", style.ToString().ToLower(), ToBootstrapSize(size), caption))); } return(new HtmlString(string.Format("<button type=\"button\" class=\"btn btn-{0}\">{1}</button>", style.ToString().ToLower(), caption))); }
public static MvcHtmlString SiteButton(this HtmlHelper helper, string caption, Enums.ButtonStyle style, Enums.ButtonSize size) { string format = "<button type=\"button\" class=\"btn btn-{0} {1}\">{2}</button>"; return(new MvcHtmlString(string.Format(format, style.ToString().ToLower(), ToBootstrapSize(size), caption))); }