public ToggleButtonGroup(StylingColor activeButtonStylingColor, StylingColor inactiveButtonStylingColor) { ClassName = "btn-group"; SetAttribute("role", "group"); _activeButtonClassName = "btn-" + Enum.GetName(typeof(StylingColor), activeButtonStylingColor).ToLower(); _inActiveButtonClassName = "btn-" + Enum.GetName(typeof(StylingColor), inactiveButtonStylingColor).ToLower(); }
public CellColoring(TableHeadEntry tableHeadEntry, string textValue, StylingColor color, int tableHeadIndex) { TableHeadEntry = tableHeadEntry; TextValue = textValue; Color = color; TableHeadIndex = tableHeadIndex; }
public TableDataEntry(string value, int colspan = 1, StylingColor color = StylingColor.Light) : base("td") { if (value != "") { Text = value; } if (colspan != 1) { SetAttribute("colspan", colspan); } if (color != StylingColor.Light) { ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower(); } }
public Button(StylingColor buttonType = StylingColor.Primary, bool asOutline = false, ButtonSize size = ButtonSize.Normal, bool asBlock = false, string text = "", int widthInPx = -1, string fontAwesomeIcon = "") : base("button") { SetAttribute("type", "button"); ClassName = $"btn btn-{(asOutline == true ? "outline-" : "")}{Enum.GetName(typeof(StylingColor), buttonType).ToLower()}"; ClassName += (size == ButtonSize.Large ? " btn-lg" : size == ButtonSize.Small ? " btn-sm" : ""); ClassName += (asBlock == true ? " btn-block" : ""); if (string.IsNullOrWhiteSpace(text) == false) { Text = text; } if (widthInPx > 0) { Style.Width = widthInPx; } SetFontAwesomeIcon(fontAwesomeIcon); }
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); }
public TableHeadEntry(string scope, string value, CaretStyle caretStyle = CaretStyle.None, StylingColor color = StylingColor.Light) : base("th") { CurrentCaretStyle = caretStyle; if (scope != "") { SetAttribute("scope", scope); } if (value != "") { Text = value; } if (caretStyle != CaretStyle.None) { switch (caretStyle) { case CaretStyle.Up: AppendChild(new MyIElement() { ClassName = "fas fa-sort-up float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.Down: AppendChild(new MyIElement() { ClassName = "fas fa-sort-down float-right", Style = { LineHeight = 1.5 } }); break; case CaretStyle.UpDown: AppendChild(new MyIElement() { ClassName = "fas fa-sort float-right", Style = { LineHeight = 1.5 } }); break; default: throw new ArgumentOutOfRangeException(nameof(caretStyle), caretStyle, null); } } if (color != StylingColor.Light) { ClassName = "table-" + Enum.GetName(typeof(StylingColor), color).ToLower(); } }