Skip to content

Commit 3001628

Browse files
authored
Map all GoogleFontIconName enum values (#61)
- **Expanded and reorganized icon support:** Added many new icons (such as `queue_music`, `quick_phrases`, and Nest/network-related icons) to `GoogleFontIconName.cs` and updated summary comments for clarity. - **Cleanup and removal:** Removed outdated/redundant icons (e.g., `pedestrian_traffic_light`, `pen_size_1`) and streamlined code for maintainability. - **Consistency improvements:** Renamed some icons for clarity and ensured summaries are up-to-date. - **Utility enhancements:** Updated `GoogleFontIconUtility.cs` to handle unmatched styles gracefully (returns empty string by default). - **Demo improvements:** Updated demo Razor files to display icon counts, improved iteration logic, styling, and initialization for better consistency and UX. **Overall:** This commit modernizes, cleans, and expands the icon enum and its utility logic, while enhancing demos for usability and clarity.
1 parent 52d64d9 commit 3001628

4 files changed

Lines changed: 14159 additions & 9945 deletions

File tree

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,38 @@
1+
<Block>
2+
Count: <strong>@iconsCount</strong>
3+
</Block>
4+
15
<div class="grid">
2-
@foreach (var item in Enum.GetValues<BootstrapIconName>().Where(x => x != BootstrapIconName.None))
6+
@if (allIcons is not null && allIcons.Any())
37
{
4-
<div class="cell has-text-centered has-background-light is-clickable py-3">
5-
<div>
6-
<BootstrapIcon Name="item" />
7-
</div>
8-
<div>
9-
@item.ToString()
8+
foreach (var item in Enum.GetValues<BootstrapIconName>().Where(x => x != BootstrapIconName.None))
9+
{
10+
<div class="cell has-text-centered has-background-light is-clickable py-3">
11+
<div>
12+
<BootstrapIcon Name="item" />
13+
</div>
14+
<div>
15+
@item.ToString()
16+
</div>
1017
</div>
11-
</div>
18+
}
1219
}
1320
</div>
1421

1522
<style>
1623
.cell:hover {
1724
color: hsl(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-l)) !important;
1825
}
19-
</style>
26+
</style>
27+
28+
@code {
29+
int iconsCount = 0;
30+
IEnumerable<BootstrapIconName>? allIcons;
31+
32+
protected override void OnInitialized()
33+
{
34+
allIcons = Enum.GetValues<BootstrapIconName>().Where(x => x != BootstrapIconName.None);
35+
iconsCount = allIcons.Count();
36+
base.OnInitialized();
37+
}
38+
}

BlazorExpress.Bulma.Demo.RCL/Pages/Demos/Icons/GoogleFontIcons/GoogleFontIcon_Demo_99_All_Icons.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Block>
2-
Icons Count: @iconsCount
2+
Count: <strong>@iconsCount</strong>
33
</Block>
44

55
<div class="grid">

0 commit comments

Comments
 (0)