@inherits DComponentBase
@* daisyUI Countdown: https://daisyui.com/components/countdown/ . Shows one number (0-999) that rolls to each new
Value; --value and --digits go in the inner span's style. For a clock, put several side by side with separators. *@
@Number
@code {
/// The number to show, clamped to 0-999.
[Parameter] public int Value { get; set; }
/// Minimum digits shown (1-3); 2 pads 5 to 05.
[Parameter] public int Digits { get; set; } = 1;
int Number => Math.Clamp(Value, 0, 999);
string ValueStyle => Digits > 1 ? $"--value:{Number}; --digits:{Math.Min(Digits, 3)};" : $"--value:{Number};";
}