Closed adamfoneil closed 3 months ago
Hi! If it's purely a presentational component (without interactions), then Hydro View could help:
@model Card
<div class="card m-4 p-2">
<div class="card-body">
<h5 class="card-title fw-bold">@Model.Title</h5>
@Model.Slot()
</div>
</div>
public class Card : HydroView
{
public string Title { get; set; } = string.Empty;
}
And usage:
<card title="My title">
<p>
Content of my card
</p>
</card>
Does this solve your use case, or you need to pass the markup to Hydro Component instead of Hydro View?
wow! yes that works for me!
This is just a question. I don't see this in the documentation. I have a Blazor component like this:
Is there a way to pass markup as an argument to hydro component?