Refactor ScheduledTeamsList component to enhance student exclusion UI
This commit updates the ScheduledTeamsList.razor component by replacing the existing MudChip implementation with InteractiveChip for better user interaction when managing student exclusions. The logic for displaying excluded students has been simplified, improving the overall readability and maintainability of the code. Additionally, the hover functionality has been removed to streamline the user experience. These changes contribute to a more intuitive and responsive scheduling interface.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
@namespace WebApp.Components.Shared.Components
|
||||
|
||||
<MudStack Row="true" Spacing="0" AlignItems="AlignItems.Center"
|
||||
Style="position: relative; display: inline-flex;"
|
||||
Class="@WrapperClass"
|
||||
@onmouseenter="@(() => _isHovered = true)"
|
||||
@onmouseleave="@(() => _isHovered = false)">
|
||||
<MudChip T="string"
|
||||
Size="@Size"
|
||||
Color="@Color"
|
||||
Variant="@Variant"
|
||||
Style="@Style"
|
||||
Class="@Class">
|
||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||
@ChildContent
|
||||
@if (_isHovered && ControlContent != null)
|
||||
{
|
||||
@ControlContent
|
||||
}
|
||||
</MudStack>
|
||||
</MudChip>
|
||||
</MudStack>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public required RenderFragment ChildContent { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment? ControlContent { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Size Size { get; set; } = Size.Small;
|
||||
|
||||
[Parameter]
|
||||
public Color Color { get; set; } = Color.Default;
|
||||
|
||||
[Parameter]
|
||||
public Variant Variant { get; set; } = Variant.Text;
|
||||
|
||||
[Parameter]
|
||||
public string? Style { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? Class { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? WrapperClass { get; set; }
|
||||
|
||||
private bool _isHovered = false;
|
||||
}
|
||||
Reference in New Issue
Block a user