File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/BootstrapBlazor/Components/Card Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 22@inherits BootstrapModuleComponentBase
33@attribute [BootstrapModuleAutoLoader(JSObjectReference = true)]
44
5- <div @attributes =" @AdditionalAttributes" class =" @ClassString" id =" @Id " >
5+ <div @attributes =" @AdditionalAttributes" id = " @Id " class =" @ClassString" style =" @HeaderStyleString " >
66 @if (HeaderTemplate != null || ! string .IsNullOrEmpty (HeaderText ))
77 {
88 <div class =" card-header" >
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ public partial class Card
4949 . AddClass ( "text-muted" , IsCenter )
5050 . Build ( ) ;
5151
52+ /// <summary>
53+ /// 获得/设置 Card Header 高度 padding Y轴值 默认 null
54+ /// <para>单位需自行给定 如 0.25rem</para>
55+ /// </summary>
56+ [ Parameter ]
57+ public string ? HeaderPaddingY { get ; set ; }
58+
5259 /// <summary>
5360 /// 获得/设置 收缩展开箭头图标 默认 fa-solid fa-circle-chevron-right
5461 /// </summary>
@@ -119,6 +126,10 @@ public partial class Card
119126 [ NotNull ]
120127 private IIconTheme ? IconTheme { get ; set ; }
121128
129+ private string ? HeaderStyleString => CssBuilder . Default ( )
130+ . AddStyle ( "--bs-card-cap-padding-y" , HeaderPaddingY )
131+ . Build ( ) ;
132+
122133 /// <summary>
123134 /// <inheritdoc/>
124135 /// </summary>
You can’t perform that action at this time.
0 commit comments