Escali License control 1
ProductSelector.razor
Gå til dokumentasjonen til denne filen.
1<div class="product-selector-container">
2 <button class="btn btn-product-selector-left @LeftButtonStyle" @onclick="SelectFinancials">Escali Financials</button>
3 <button class="btn btn-product-selector-right @RightButtonStyle" @onclick="SelectSupervision">Escali Supervision</button>
4</div>
5
6@code {
7
8 private bool LeftButtonSelected { get; set; } = true;
9
10 private string LeftButtonStyle => LeftButtonSelected ? "btn-product-selector-selected" : "";
11 private string RightButtonStyle => LeftButtonSelected ? "" : "btn-product-selector-selected";
12
13 [Parameter]
14 public EventCallback<string> ChangeProductEvent { get; set; }
15
16 private void SelectFinancials()
17 {
18 LeftButtonSelected = true;
19 ChangeProductEvent.InvokeAsync("Escali Financials");
20 }
21
22 private void SelectSupervision()
23 {
24 LeftButtonSelected = false;
25 ChangeProductEvent.InvokeAsync("Escali Supervision");
26 }
27
28}