File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/BootstrapBlazor/Components/Input Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 44@if (IsInputGroupLabel )
55{
66 <div @attributes =" @AdditionalAttributes" class =" @ClassString" style =" @StyleString " required =" @Required" >
7- <span >@DisplayText </span >
7+ @if (ChildContent != null )
8+ {
9+ @ChildContent
10+ }
11+ else
12+ {
13+ <span >@DisplayText </span >
14+ }
815 </div >
916}
1017else
1118{
12- <label @attributes =" @AdditionalAttributes" class =" @ClassString" style =" @StyleString " required =" @Required" >@DisplayText </label >
19+ <label @attributes =" @AdditionalAttributes" class =" @ClassString" style =" @StyleString " required =" @Required" >
20+ @if (ChildContent != null )
21+ {
22+ @ChildContent
23+ }
24+ else
25+ {
26+ @DisplayText
27+ }
28+ </label >
1329}
Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ public partial class BootstrapInputGroupLabel
4141 [ Parameter ]
4242 public bool ShowRequiredMark { get ; set ; }
4343
44+ /// <summary>
45+ /// Gets or sets the child content. Default is null.
46+ /// </summary>
47+ [ Parameter ]
48+ public RenderFragment ? ChildContent { get ; set ; }
49+
4450 private string ? Required => ShowRequiredMark ? "true" : null ;
4551
4652 private bool IsInputGroupLabel => InputGroup != null ;
You can’t perform that action at this time.
0 commit comments