mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
21 lines
444 B
Plaintext
21 lines
444 B
Plaintext
<div class="@($"alert alert-{Style.ToString().ToLower()}")" role="alert">
|
|
@ChildContent
|
|
</div>
|
|
@code{
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; } =@<b>This is a default value</b>;
|
|
[Parameter]
|
|
public AlertStyle Style { get; set; }
|
|
public enum AlertStyle
|
|
{
|
|
Primary,
|
|
Secondary,
|
|
Success,
|
|
Danger,
|
|
Warning,
|
|
Info,
|
|
Light,
|
|
Dark
|
|
}
|
|
}
|