mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2026-04-07 07:14:04 +00:00
20 lines
444 B
Text
20 lines
444 B
Text
<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
|
|
}
|
|
}
|