Consolidate play/pause icon logic into PlaybackIcons mapper and PlayStateIcon component

Add Disabled parameter to PlayStateIcon; forward to MudIconButton;
pass Disabled="!IsLoaded" from PlayerControls to match Stop button parity.
This commit is contained in:
daniel-c-harvey
2026-06-06 10:46:32 -04:00
parent 1d97729e57
commit e3fe401abf
9 changed files with 93 additions and 19 deletions
@@ -1,9 +1,11 @@
@namespace DeepDrftPublic.Client.Controls.AudioPlayerBar
@using DeepDrftPublic.Client.Controls
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
<MudIconButton Icon="@GetPlayIcon()"
<PlayStateIcon Size="Size.Large"
Color="Color.Primary"
Size="Size.Large"
OnClick="@TogglePlayPause"
Disabled="!IsLoaded"/>
Disabled="!IsLoaded"
OnToggle="@TogglePlayPause"/>
<MudIconButton Icon="@Icons.Material.Filled.Stop"
Color="Color.Primary"
Size="Size.Large"