@using PancakesWeb.Data

@if (Data.Href != null)
{
    <a href="@Data.Href" target="_blank" class="button-link">@Image</a>
}
else
{
    @Image
}

@code {
    [Parameter, EditorRequired] public required Button Data { get; set; }

    private RenderFragment Image =>
        @<img src="@Assets[$"imgs/buttons/{Data.Image}"]" alt="@Data.Title" title="@Data.Title" class="button-img"/>;

}