< Summary

Information
Class: Syki.Front.Components.Buttons.DialogSaveButton
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Components/Buttons/DialogSaveButton.razor
Tag: 22_11348620282
Line coverage
88%
Covered lines: 8
Uncovered lines: 1
Coverable lines: 9
Total lines: 35
Line coverage: 88.8%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Text()100%11100%
get_Class()100%11100%
get_OnClick()100%11100%
HandleClick()100%11100%
get_Disabled()100%11100%
get_DisabledChanged()100%210%

File(s)

/home/runner/work/syki/syki/Front/Components/Buttons/DialogSaveButton.razor

#LineLine coverage
 1@namespace Syki.Front.Components.Buttons
 2
 3<MudButton
 4    Class="@Class"
 5    OnClick="@HandleClick"
 6    Variant="Variant.Filled"
 7    Disabled="@Disabled"
 8    Style="@($"color: white; background: {Colors.Green.Default};")"
 9>
 10    @Text
 11</MudButton>
 12
 13@code
 14{
 15    [Parameter]
 816    public string Text { get; set; } = "Salvar";
 17
 18    [Parameter]
 719    public string Class { get; set; } = "mr-4";
 20
 21    [Parameter]
 222    public EventCallback<MouseEventArgs> OnClick { get; set; }
 23
 24    private async Task HandleClick()
 25    {
 126        Disabled = true;
 127        await OnClick.InvokeAsync();
 128        Disabled = false;
 129    }
 30
 31    [Parameter]
 632    public bool Disabled { get; set; }
 33    [Parameter]
 034    public EventCallback<bool> DisabledChanged { get; set; }
 35}