first commit -push
This commit is contained in:
33
RobotNet.WebApp/Components/ConfirmDialog.razor
Normal file
33
RobotNet.WebApp/Components/ConfirmDialog.razor
Normal file
@@ -0,0 +1,33 @@
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
<MudText>@Content</MudText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton Class="m-2" OnClick="Cancel" Variant="Variant.Filled">@CancelText</MudButton>
|
||||
<MudButton Class="m-2" Color="@Color" Variant="Variant.Filled" OnClick="Submit">@ConfirmText</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
private IMudDialogInstance? MudDialog { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? Content { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? ConfirmText { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? CancelText { get; set; } = "Cancel";
|
||||
|
||||
[Parameter]
|
||||
public Color Color { get; set; }
|
||||
|
||||
private void Submit() => MudDialog?.Close(DialogResult.Ok(true));
|
||||
|
||||
private void Cancel() => MudDialog?.Cancel();
|
||||
}
|
||||
Reference in New Issue
Block a user