26 lines
831 B
Plaintext
26 lines
831 B
Plaintext
@inherits DComponentBase
|
|||
|
|
|
||
|
|
@* An indicator-item of a DIndicator, placed on its corner or edge, e.g. with class="badge badge-primary". *@
|
||
|
|
<span @attributes="AdditionalAttributes" class="@CssClass">@ChildContent</span>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
[Parameter] public RenderFragment ChildContent { get; set; }
|
||
|
|
[Parameter] public DIndicatorHorizontal Horizontal { get; set; }
|
||
|
|
[Parameter] public DIndicatorVertical Vertical { get; set; }
|
||
|
|
|
||
|
|
string CssClass => Cx("indicator-item", HorizontalClass, VerticalClass, Class);
|
||
|
|
|
||
|
|
string HorizontalClass => Horizontal switch
|
||
|
|
{
|
||
|
|
DIndicatorHorizontal.Start => "indicator-start",
|
||
|
|
DIndicatorHorizontal.Center => "indicator-center",
|
||
|
|
_ => null
|
||
|
|
};
|
||
|
|
|
||
|
|
string VerticalClass => Vertical switch
|
||
|
|
{
|
||
|
|
DIndicatorVertical.Middle => "indicator-middle",
|
||
|
|
DIndicatorVertical.Bottom => "indicator-bottom",
|
||
|
|
_ => null
|
||
|
|
};
|
||
|
|
}
|