For example, I want a piece of inline text to render as a different color, how do I do that? The following code renders <FluentLabel>
as p
. I want something that acts like a span
if possible:
<p>
Publishing:
@if (cat.PublishedTime is null)
{
<FluentLabel Color="Color.Warning">Unpublished</FluentLabel>
}
else
{
<FluentLabel>@(cat.PublishedTime)</FluentLabel>
}
</p>
The maintainer suggests using Style
and set it to display: inline
:
<p>
Publishing:
@if (cat.PublishedTime is null)
{
<FluentLabel Color="Color.Warning" Style="display: inline;">Unpublished</FluentLabel>
}
else
{
<FluentLabel Style="display: inline;">@(cat.PublishedTime)</FluentLabel>
}
</p>