public TabNavigation(bool asCardStyle = false, bool includeAddButton = false) : base("div") { Nav navElement = new Nav(); _navigationDiv = new Div { ClassName = "nav nav-tabs" }; if (asCardStyle) { ClassName = "card text-center"; navElement.ClassName = "card-header"; _navigationDiv.ClassName += " card-header-tabs"; } _navigationDiv.SetAttribute("role", "tablist"); navElement.AppendChild(_navigationDiv); _contentDiv = new Div { ClassName = "tab-content" }; base.AppendChild(navElement); base.AppendChild(_contentDiv); if (includeAddButton) { AddButton = new Button(StylingColor.Primary, true, Button.ButtonSize.Small, false, "+"); AddButton.AddStyling(StylingOption.MarginTop, 1); AddButton.AddStyling(StylingOption.MarginRight, 3); AddButton.AddStyling(StylingOption.Height, 50); _navigationDiv.AppendChild(AddButton); } }
public TableDataEntry(Button content, int colspan = 1, StylingColor color = StylingColor.Light) : base("td") { if (content != null) { AppendChild(content); } if (colspan != 1) { SetAttribute("colspan", colspan); } if (color != StylingColor.Light) { ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower(); } AddStyling(StylingOption.PaddingTop, 1); AddStyling(StylingOption.PaddingBottom, 1); AddStyling(StylingOption.PaddingLeft, 1); AddStyling(StylingOption.PaddingRight, 1); }