Skip to content

Commit b59bf63

Browse files
authored
MudWatch (#41)
* MudWatch Initialize * API * Cleanup
1 parent 87ca46f commit b59bf63

File tree

10 files changed

+573
-3
lines changed

10 files changed

+573
-3
lines changed

CodeBeam.MudExtensions/CodeBeam.MudExtensions.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
<PackageReference Include="MudBlazor" Version="6.0.17" />
2626
</ItemGroup>
2727

28-
<Target Name="ToolRestore" BeforeTargets="PreBuildEvent">
28+
<!--Uncomment it on development and debug to generate min.css on rebuild-->
29+
<!--This sections causes to fail auto deployment to CloudFlare-->
30+
<!--<Target Name="ToolRestore" BeforeTargets="PreBuildEvent">
2931
<Exec Command="dotnet tool restore" StandardOutputImportance="high" />
30-
</Target>
32+
</Target>-->
3133

3234
<Target Name="PreBuild" AfterTargets="ToolRestore">
3335
<Exec Command="dotnet tool run webcompiler -r Styles/MudExtensions.scss -c excubowebcompiler.json" StandardOutputImportance="high" />
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@namespace MudExtensions
2+
@inherits MudComponentBase
3+
4+
5+
<div class="@Classname" style="@Style">
6+
@if (Wheel)
7+
{
8+
@if (ShowHour)
9+
{
10+
<MudWheel @ref="_wheelHour" Class="mud-width-full" @bind-Value="_hour" ItemCollection="Hours" WheelLevel="0" Dense="@Dense" Color="@Color" ToStringFunc="new Func<int, string>(NumberToString)" />
11+
}
12+
@if (ShowMinute)
13+
{
14+
<MudWheel @ref="_wheelMinute" Class="mud-width-full" @bind-Value="_minute" ItemCollection="Minutes" WheelLevel="0" ToStringFunc="new Func<int, string>(NumberToString)" Dense="@Dense" Color="@Color" />
15+
}
16+
@if (ShowSecond)
17+
{
18+
<MudWheel @ref="_wheelSecond" Class="mud-width-full" @bind-Value="_second" ItemCollection="Seconds" WheelLevel="0" ToStringFunc="new Func<int, string>(NumberToString)" Dense="@Dense" Color="@Color" />
19+
}
20+
@if (ShowMillisecond)
21+
{
22+
<MudWheel Class="mud-width-full" @bind-Value="_milliSecond" ItemCollection="MilliSeconds" WheelLevel="0" ToStringFunc="new Func<int, string>(NumberToString)" Dense="@Dense" Color="@Color" />
23+
}
24+
}
25+
else
26+
{
27+
<MudText Typo="@Typo" Color="@Color" Align="Align.Center">@GetWatchText() <MudText Inline="true" Typo="@TypoMillisecond">@($"{(ShowMillisecond ? _milliSecond.ToString("D3") : null)}")</MudText></MudText>
28+
}
29+
</div>
30+

0 commit comments

Comments
 (0)