/// <summary> /// 创建组件所需要的 class 类。 /// </summary> /// <param name="collection">css 类名称集合。</param> protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("position-absolute"); collection.Add(ComponentUtil.GetColorCssClass(Color, "bg-")); collection.Add("w-100"); collection.Add("overflow-hidden"); collection.Add(IsShown ? "d-flex" : "d-none"); collection.Add("flex-column flex-fill"); }
protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add(ComponentUtil.GetColorCssClass(Color, "bg-")); collection.Add("progress-bar"); if (Striped) { collection.Add("progress-bar-striped"); } }
/// <summary> /// 构造组件所需 class 类。 /// </summary> /// <param name="collection"></param> protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("badge"); collection.Add(ComponentUtil.GetColorCssClass(Color, "badge-")); if (Pill) { collection.Add("badge-pill"); } }
protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("pagination"); if (Size != Size.Default) { collection.Add(ComponentUtil.GetSizeCssClass(Size, "pagination-")); } }
/// <summary> /// 创建 alert 元素的 css 的名称。 /// </summary> /// <param name="collection">样式集合。</param> protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("alert"); collection.Add(ComponentUtil.GetColorCssClass(Color, "alert-")); collection.Add("fade"); if (IsShown) { collection.Add("show"); } if (Dismisable) { collection.Add("alert-dismissible"); } }
/// <summary> /// 创建组件所需要的 class 类。 /// </summary> /// <param name="collection">css 类名称集合。</param> protected override void CreateComponentCssClass(ICollection <string> collection) { if (Overlay) { collection.Add("card-img-overlay"); } else { collection.Add("card-body"); } if (Parent.Color.HasValue && Parent.Bordered) { collection.Add(ComponentUtil.GetColorCssClass(Parent.Color.Value, "text-")); } }
protected override void CreateComponentCssClass(ICollection <string> collection) { var spinnerClass = Grow ? "grow" : "border"; collection.Add($"spinner-{spinnerClass}"); if (Color.HasValue) { collection.Add(ComponentUtil.GetColorCssClass(Color.Value, "text-")); } if (Size != Size.Default) { collection.Add(ComponentUtil.GetSizeCssClass(Size, $"spinner-{spinnerClass}-")); } }
/// <summary> /// 创建组件所需要的 css Class。 /// </summary> protected override void CreateComponentCssClass(ICollection <string> collection) { if (Size != Size.Default) { collection.Add(ComponentUtil.GetSizeCssClass(Size, "btn-group-")); } if (Vertical) { collection.Add("btn-group-vertical"); } else { collection.Add("btn-group"); } }
protected override void CreateComponentCssClass(ICollection <string> collection) { if (Centered) { collection.Add("modal-dialog-centered"); } if (Size != Size.Default) { collection.Add(ComponentUtil.GetSizeCssClass(Size, "modal-")); } if (Scrollable) { collection.Add("modal-dialog-scrollable"); } }
/// <summary> /// 构建按钮的 class 名称。 /// </summary> protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("btn"); if (Blocked) { collection.Add("btn-block"); } collection.Add(string.Format(" btn{0}-{1}", (Outline ? "-outline" : string.Empty), ComponentUtil.GetColorCssClass(Color))); if (Size != Size.Default) { collection.Add(ComponentUtil.GetSizeCssClass(Size, "btn-")); } if (Actived) { collection.Add("active"); } }
/// <summary> /// 创建组件所需要的 class 类。 /// </summary> /// <param name="collection">css 类名称集合。</param> protected override void CreateComponentCssClass(ICollection <string> collection) { collection.Add("card"); if (Color.HasValue) { if (Bordered) { collection.Add(ComponentUtil.GetColorCssClass(Color.Value, "border-")); } else { collection.Add(ComponentUtil.GetColorCssClass(Color.Value, "bg-")); collection.Add(ComponentUtil.GetReverseColorCssClass(Color.Value, "text-")); } } if (AlignHeight) { collection.Add("h-100"); } }