Skip to content

Commit 414217e

Browse files
committed
Adds spacing to vote buttons
Improves the visual separation between vote option buttons for better readability. Updates array and enumerable initializations to use C# 12 collection expressions for cleaner syntax.
1 parent a740bf0 commit 414217e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

PointerStar/Client/Pages/Room.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
@if (ViewModel.IsTeamMember)
4646
{
4747
<MudItem xs="12">
48-
@foreach (string option in ViewModel.RoomState?.VoteOptions ?? Enumerable.Empty<string>())
48+
@foreach (string option in ViewModel.RoomState?.VoteOptions ?? [])
4949
{
5050
Color color = option == ViewModel.CurrentVote ? Color.Success : Color.Primary;
51-
<MudButton Class="d-inline-flex pa-4 vote-button" Variant="Variant.Filled" Color="color" OnClick="() => ViewModel.SubmitVoteAsync(option)">@option</MudButton>
51+
<MudButton Class="d-inline-flex pa-4 vote-button" Style="margin: 5px" Variant="Variant.Filled" Color="color" OnClick="() => ViewModel.SubmitVoteAsync(option)">@option</MudButton>
5252
}
5353
</MudItem>
5454
}

PointerStar/Shared/RoomState.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public IReadOnlyList<User> Observers
1515
//We want the default to be true so new facilitators have this on by default
1616
public bool AutoShowVotes { get; init; } = true;
1717

18-
public string[] VoteOptions { get; init; } = new[]
19-
{
18+
public string[] VoteOptions { get; init; } =
19+
[
2020
"1",
2121
"2",
2222
"3",
@@ -26,7 +26,7 @@ public IReadOnlyList<User> Observers
2626
"21",
2727
"Abstain",
2828
"?"
29-
};
29+
];
3030
public DateTime? VoteStartTime { get; init; }
3131
}
3232

0 commit comments

Comments
 (0)