@inherits DComponentBase
@* One step of a DSteps:
. A Color marks it (usually the completed steps); Marker replaces the number
in its circle (data-content) and Icon replaces the circle's content with a step-icon. *@
@if (Icon is not null)
{
@Icon
}
@ChildContent
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public DColor Color { get; set; }
/// Text shown in the step's circle instead of its number, e.g. "✓" or "?" (data-content).
[Parameter] public string Marker { get; set; }
[Parameter] public RenderFragment Icon { get; set; }
string ColorClass => Color switch
{
DColor.Neutral => "step-neutral",
DColor.Primary => "step-primary",
DColor.Secondary => "step-secondary",
DColor.Accent => "step-accent",
DColor.Info => "step-info",
DColor.Success => "step-success",
DColor.Warning => "step-warning",
DColor.Error => "step-error",
_ => null
};
}