In MudBlazor what is the cleanest way to align a MudIcon with some corresponding MudText.
{
<CardHeaderContent>
<MudText Typo="Typo.h6" Align="Align.Center">
<MudIcon Icon="@Icons.Material.Filled.Business" Title="Favorite" /> Company Details
</MudText>
</CardHeaderContent>
}
The above icon doens’t align with the text.
?
2
Answers
I figgured this out:
I wrapped the content in a div and added d-flex & align-centre. the justify-centre is just to center the text in the container and not needed to align the icon with the text.
As you have the
MudIcon
as a child content ofMudText
, then you can turn theMudText
into a flexbox andalign-center
.