Import from internal git
This commit is contained in:
35
WebServer/Components/Molecule/ActionCard.razor
Normal file
35
WebServer/Components/Molecule/ActionCard.razor
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="action-box" @onclick="AsyncInvocation">
|
||||
@ChildContent
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Action? Action { get; set; }
|
||||
|
||||
private async void AsyncInvocation()
|
||||
{
|
||||
if (Action == null) return;
|
||||
await Task.Run(Action);
|
||||
}
|
||||
}
|
||||
|
||||
<style>
|
||||
|
||||
.action-box
|
||||
{
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
background: rgb(143,134,191);
|
||||
color: #d7d7d7;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.action-box:hover {
|
||||
box-shadow: 0 0 15px #736d6d;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user