using Connected.Annotations; using Connected.Utilities; using Microsoft.AspNetCore.Components; namespace Connected.Components; public partial class CardMedia : UIComponent { protected string StyleString => StyleBuilder.Default($"background-image:url(\"{Image}\");height: {Height}px;") .AddStyle(this.Style) .Build(); protected string Classname => new CssBuilder("mud-card-media") .AddClass(Class) .Build(); /// /// Title of the image used for accessibility. /// [Parameter] [Category(CategoryTypes.Card.Behavior)] public string Title { get; set; } /// /// Specifies the path to the image. /// [Parameter] [Category(CategoryTypes.Card.Behavior)] public string Image { get; set; } /// /// Specifies the height of the image in px. /// [Parameter] [Category(CategoryTypes.Card.Behavior)] public int Height { get; set; } = 300; }