Skip to content

Commit

Permalink
Implements [HxCard] ImageCssClass needed #739
Browse files Browse the repository at this point in the history
  • Loading branch information
crdo committed Apr 26, 2024
1 parent 9e86293 commit 873fc0e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Havit.Blazor.Components.Web.Bootstrap/Cards/HxCard.razor
Expand Up @@ -10,7 +10,7 @@
{
<img src="@ImageSrc"
alt="@ImageAlt"
class="@(ImagePlacement == CardImagePlacement.Top ? "card-img-top" : "card-img")"
class="@CssClassHelper.Combine(ImageCssClass, ImagePlacement == CardImagePlacement.Top ? "card-img-top" : "card-img")"
width="@ImageWidth"
height="@ImageHeight" />
}
Expand Down
7 changes: 6 additions & 1 deletion Havit.Blazor.Components.Web.Bootstrap/Cards/HxCard.razor.cs
Expand Up @@ -105,8 +105,13 @@ static HxCard()
[Parameter] public string FooterCssClass { get; set; }
protected string FooterCssClassEffective => FooterCssClass ?? GetSettings()?.FooterCssClass ?? GetDefaults().FooterCssClass;

/// <summary>
/// Additional CSS class for the image.
/// </summary>
[Parameter] public string ImageCssClass { get; set; }

/// <summary>
/// Additional attributes to be splatted onto an underlying HTML element.
/// </summary>
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> AdditionalAttributes { get; set; }
}
}
Expand Up @@ -887,6 +887,11 @@
Additional CSS class for the footer.
</summary>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.HxCard.ImageCssClass">
<summary>
Additional CSS class for the image.
</summary>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.HxCard.AdditionalAttributes">
<summary>
Additional attributes to be splatted onto an underlying HTML element.
Expand Down Expand Up @@ -9456,11 +9461,9 @@
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.HxTabPanel.InitialActiveTabId">
<summary>
ID of the tab which should be active at the very beginning.
ID of the tab which should be active at the very beginning.<br />
We are considering deprecating this parameter. Please use <see cref="P:Havit.Blazor.Components.Web.Bootstrap.HxTabPanel.ActiveTabId"/> instead (<c>@bind-ActiveTabId</c>).
</summary>
<remarks>
Obsolete? Use @bind-<see cref="P:Havit.Blazor.Components.Web.Bootstrap.HxTabPanel.ActiveTabId"/> instead.
</remarks>
</member>
<member name="P:Havit.Blazor.Components.Web.Bootstrap.HxTabPanel.ChildContent">
<summary>
Expand Down

0 comments on commit 873fc0e

Please sign in to comment.