Skip to content

Commit 5ee89e3

Browse files
committed
Update version and refactor UseFluentUISystemIcons
- Bump version from 8.0.0.7 to 8.0.0.8 in Directory.Build.props. - Change UseFluentUISystemIcons from bool to bool? in multiple files. - Modify Check.razor and Checkbox.razor to utilize UseFluentUISystemIcons. - Add new Razor component Libs.razor to display loaded assemblies.
1 parent daa12c0 commit 5ee89e3

11 files changed

Lines changed: 15 additions & 22 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<IsPackable>true</IsPackable>
1414
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
1515
<PackageOutputPath>../../packages</PackageOutputPath>
16-
<Version>8.0.0.7</Version>
16+
<Version>8.0.0.8</Version>
1717
<!--<GeneratePackageOnBuild>false</GeneratePackageOnBuild>-->
1818
</PropertyGroup>
1919

src/BlazorFluentUI.CoreComponents/BaseComponent/Extensions/ServiceExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static void AddBlazorFluentUI(this IServiceCollection services, Action<Fl
1616
var setup = services.AddOptions<FluentUISettings>();
1717
setup.Configure(options =>
1818
{
19-
options.UseFluentUISystemIcons = true;
19+
options.UseFluentUISystemIcons = null;
2020
});
2121
if (configure != null)
2222
setup.Configure(configure);

src/BlazorFluentUI.CoreComponents/Button/ButtonParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ButtonParameters : FluentUIComponentBase
2323
[Parameter] public string? SecondaryText { get; set; }
2424
[Parameter] public bool Toggle { get; set; }
2525
[Parameter] public bool Split { get; set; }
26-
[Parameter] public bool UseFluentUISystemIcons { get; set; } = true;
26+
[Parameter] public bool? UseFluentUISystemIcons { get; set; }
2727

2828
[Parameter] public string? IconName { get; set; }
2929
[Parameter] public string? IconSrc { get; set; }
@@ -48,4 +48,4 @@ public class ButtonParameters : FluentUIComponentBase
4848

4949
#endregion
5050
}
51-
}
51+
}

src/BlazorFluentUI.CoreComponents/Check/Check.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
}
1313
else
1414
{
15-
<Icon IconName="circle"
15+
<Icon IconName="circle" UseFluentUISystemIcons=true
1616
ClassName="ms-Check-circle" />
17-
<Icon IconName="checkmark"
17+
<Icon IconName="checkmark" UseFluentUISystemIcons=true
1818
ClassName="ms-Check-check" />
1919
}
2020
</div>

src/BlazorFluentUI.CoreComponents/Checkbox/Checkbox.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
aria-setsize=@AriaSetSize />
2222
<label class=@($"ms-Checkbox-label") for="@Id">
2323
<div class=@($"ms-Checkbox-checkbox")>
24-
<Icon IconName="checkmark" IconSize=20 ClassName="ms-Checkbox-checkmark ms-Icon" AriaHidden=true></Icon>
24+
<Icon IconName="checkmark" UseFluentUISystemIcons=true IconSize=20 ClassName="ms-Checkbox-checkmark ms-Icon" AriaHidden=true></Icon>
2525
@*<i class=@($"ms-Checkbox-checkmark ms-Icon ms-Icon--CheckMark") aria-hidden="true"></i>*@
2626
</div>
2727
@if (OnRenderLabel == null)

src/BlazorFluentUI.CoreComponents/CommandBar/CommandBarItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class CommandBarItem : ICommandBarItem
3535

3636
public string? IconSrc { get; set; }
3737

38-
public bool UseFluentUISystemIcons { get; set; } = true;
38+
public bool? UseFluentUISystemIcons { get; set; }
3939

4040
//public object IconProps { get; set; }
4141

src/BlazorFluentUI.CoreComponents/ContextualMenu/ContextualMenuItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ContextualMenuItem : IContextualMenuItem
1515
public string? Href { get; set; }
1616
public string? IconName { get; set; }
1717
public string? IconSrc { get; set; }
18-
public bool UseFluentUISystemIcons { get; set; } = true;
18+
public bool? UseFluentUISystemIcons { get; set; }
1919
public ContextualMenuItemType ItemType { get; set; }
2020
public string? Key { get; set; }
2121
public object? KeytipProps { get; set; }

src/BlazorFluentUI.CoreComponents/ContextualMenu/IContextualMenuItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public interface IContextualMenuItem
1616
//object IconProps { get; set; }
1717
string? IconName { get; set; }
1818
string? IconSrc { get; set; }
19-
bool UseFluentUISystemIcons { get; set; }
19+
bool? UseFluentUISystemIcons { get; set; }
2020
ContextualMenuItemType ItemType { get; set; }
2121
string? Key { get; set; }
2222
object? KeytipProps { get; set; }

src/BlazorFluentUI.CoreComponents/FluentUISettings.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace BlazorFluentUI
1+
namespace BlazorFluentUI
82
{
93
public sealed record FluentUISettings
104
{
115
public static FluentUISettings Default { get; } = new FluentUISettings();
126

13-
public bool UseFluentUISystemIcons { get; set; } = false;
7+
public bool? UseFluentUISystemIcons { get; set; }
148

159
public string? BasePath { get; set; }
1610

src/BlazorFluentUI.CoreComponents/Icon/Icon.razor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Microsoft.AspNetCore.Components;
2-
using Microsoft.Extensions.Options;
32

43
namespace BlazorFluentUI
54
{
@@ -11,9 +10,9 @@ public partial class Icon : FluentUIComponentBase
1110
[Parameter] public int IconSize { get; set; } = 20;
1211
[Parameter] public string? IconSrc { get; set; }
1312
[Parameter] public IconType IconType { get; set; }
14-
[Parameter] public bool UseFluentUISystemIcons { get; set; } = false;
13+
[Parameter] public bool? UseFluentUISystemIcons { get; set; }
1514

16-
private bool IsSystemIcons => Settings.UseFluentUISystemIcons && UseFluentUISystemIcons;
15+
private bool IsSystemIcons => UseFluentUISystemIcons ?? Settings?.UseFluentUISystemIcons ?? false;
1716

1817
public string IconClassName
1918
{

0 commit comments

Comments
 (0)