Initial commit - Common.RCL
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
@* @if(ShowDialog)
|
||||
{
|
||||
<div class="fixed inset-0 flex w-screen h-dvh bg-black bg-opacity-50 z-50">
|
||||
<div class="flex flex-col justify-between gap-10 bg-white w-1/2 h-1/2 opacity-100 mx-auto my-auto p-10">
|
||||
<h1>@TitleName</h1>
|
||||
<div class="overflow-y-auto">
|
||||
@Body
|
||||
</div>
|
||||
@if(WithButtons)
|
||||
{
|
||||
<div class="flex flex-row justify-end gap-5">
|
||||
<button @onclick="@(() => MakeAction(false))" class="btn btn-primary">Cancel</button>
|
||||
<button @onclick="@(() => MakeAction(true))" class="btn btn-primary">Ok</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@code{
|
||||
|
||||
[Parameter]
|
||||
public bool ShowDialog { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment TitleName { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment Body { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public bool WithButtons { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> ActionMade { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public List<Product> Products { get; set; }
|
||||
|
||||
|
||||
async Task MakeAction(bool action)
|
||||
{
|
||||
await ActionMade.InvokeAsync(action);
|
||||
}
|
||||
|
||||
} *@
|
||||
Reference in New Issue
Block a user