Add Alert component
This commit is contained in:
22
Oqtane.Client/Modules/Controls/Alert.razor
Normal file
22
Oqtane.Client/Modules/Controls/Alert.razor
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@namespace Oqtane.Modules.Controls
|
||||||
|
@inherits ModuleControlBase
|
||||||
|
|
||||||
|
@if (!string.IsNullOrEmpty(Message))
|
||||||
|
{
|
||||||
|
<div class="alert alert-@(Type.ToString().ToLower()) alert-dismissible fade show" role="alert">
|
||||||
|
@Message
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public AlertType Type { get; set; }
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
base.OnInitialized();
|
||||||
|
}
|
||||||
|
}
|
10
Oqtane.Client/Modules/Controls/AlertType.cs
Normal file
10
Oqtane.Client/Modules/Controls/AlertType.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace Oqtane.Modules.Controls
|
||||||
|
{
|
||||||
|
public enum AlertType
|
||||||
|
{
|
||||||
|
Information,
|
||||||
|
Danger,
|
||||||
|
Success,
|
||||||
|
Warning
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user