Initial Commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
@using Model.Entity
|
||||
@using Model.Entity.Data
|
||||
@inject IEntityDialogService entityDialogService
|
||||
|
||||
|
||||
@if (EntityId == null)
|
||||
{
|
||||
<div>Add a entity</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="entityLabel @Entity.Descriptive.ToLower()" @onclick="EntityLabelClicked">@Entity.Info().Name</button>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter] public string EntityId { get; set; } = default!;
|
||||
|
||||
private EntityModel Entity => EntityData.Get()[EntityId];
|
||||
|
||||
void EntityLabelClicked()
|
||||
{
|
||||
entityDialogService.AddDialog(EntityId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user