< Summary - Syki

Information
Class: Syki.Front.Components.Custom.SykiLabelText
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Components/Custom/SykiLabelText.razor
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 36
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Label()100%210%
get_Text()100%210%
get_ChildContent()100%210%
GetText()0%620%

File(s)

/home/runner/work/syki/syki/Front/Components/Custom/SykiLabelText.razor

#LineLine coverage
 1@namespace Syki.Front.Components.Custom
 2
 3<MudStack Spacing="0">
 4    <MudText Typo="Typo.body2" Style="color: #7C8183">
 05        @Label
 6    </MudText>
 7    <MudStack Row="true" Spacing="0">
 08        @if (ChildContent != null)
 9        {
 010            @ChildContent
 11        }
 12        else
 13        {
 14            <MudText Typo="Typo.body1">
 015                <strong>@GetText()</strong>
 16            </MudText>
 17        }
 18    </MudStack>
 19</MudStack>
 20
 21@code
 22{
 23    [Parameter]
 024    public string Label { get; set; }
 25
 26    [Parameter]
 027    public string Text { get; set; }
 28
 29    [Parameter]
 030    public RenderFragment ChildContent { get; set; }
 31
 32    private string GetText()
 33    {
 034        return Text.HasValue() ? Text : "-";
 35    }
 36}