ant-design-blazor/components/statistic/CountDown.razor
James Yeung 169b91e7d5 refactor(module: statistic): simplify format string for countdown (#309)
* refactor(module: statistic): simplify format string for countdown

* fix: wrong namespace
2020-07-05 00:08:33 +08:00

26 lines
954 B
C#

@namespace AntDesign
@inherits StatisticComponentBase<DateTime>
<div class="ant-statistic" style="@Style" @ref="Ref" id="@Id">
<div class="ant-statistic-title">
@if (Title.IsT0)@Title.AsT0 else @Title.AsT1
</div>
<div class="ant-statistic-content" style="@ValueStyle">
@if (@Prefix.IsT0 && !string.IsNullOrEmpty(Prefix.AsT0) || @Prefix.IsT1 && Prefix.AsT1 != null)
{
<span class="ant-statistic-content-prefix">
@if (@Prefix.IsT0)@Prefix.AsT0 else @Prefix.AsT1
</span>
}
<span class="ant-statistic-content-value">
@(_countDown.ToString(_format))
</span>
@if (@Suffix.IsT0 && !string.IsNullOrEmpty(@Suffix.AsT0) || @Suffix.IsT1 && @Suffix.AsT1 != null)
{
<span class="ant-statistic-content-suffix">
@if (@Suffix.IsT0)@Suffix.AsT0 else @Suffix.AsT1
</span>
}
</div>
</div>