From acbe14f1454db54e7e39fbd9afbfe644b0558266 Mon Sep 17 00:00:00 2001 From: Mohammad Aminsafaei Date: Sun, 7 Jul 2024 22:06:44 +0330 Subject: [PATCH] feat(blazorui): rename HasUnderline parameter to Underlined in BitLink #7970 (#7971) --- .../Components/Utilities/Link/BitLinkTests.cs | 2 +- .../Bit.BlazorUI/Components/Utilities/Link/BitLink.razor.cs | 4 ++-- .../Pages/Components/Utilities/Link/BitLinkDemo.razor | 4 ++-- .../Pages/Components/Utilities/Link/BitLinkDemo.razor.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs index b980766c59..2c48cfb3e2 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs +++ b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Utilities/Link/BitLinkTests.cs @@ -55,7 +55,7 @@ public void BitLinkShouldRespectUnderLineStyle(bool? hasUnderline) { if (hasUnderline.HasValue) { - parameters.Add(p => p.HasUnderline, hasUnderline.Value); + parameters.Add(p => p.Underlined, hasUnderline.Value); } }); diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Utilities/Link/BitLink.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Utilities/Link/BitLink.razor.cs index da87289c2a..407cc506f6 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Utilities/Link/BitLink.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Utilities/Link/BitLink.razor.cs @@ -24,7 +24,7 @@ public partial class BitLink : BitComponentBase /// /// Whether the link is styled with an underline or not. /// - [Parameter] public bool HasUnderline { get; set; } = false; + [Parameter] public bool Underlined { get; set; } /// /// Callback for when the link clicked @@ -36,7 +36,7 @@ public partial class BitLink : BitComponentBase protected override void RegisterCssClasses() { - ClassBuilder.Register(() => HasUnderline ? "bit-lnk-und" : string.Empty); + ClassBuilder.Register(() => Underlined ? "bit-lnk-und" : string.Empty); } protected virtual async Task HandleClick(MouseEventArgs e) diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor index e5a09fe9e1..68a71aae27 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor @@ -35,10 +35,10 @@ - +
- Underlined link + Underlined link
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor.cs index ef95e925e3..280161a974 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Utilities/Link/BitLinkDemo.razor.cs @@ -16,7 +16,7 @@ public partial class BitLinkDemo }, new() { - Name = "HasUnderline", + Name = "Underlined", Type = "bool", DefaultValue = "false", Description = "Whether the link is styled with an underline or not.", @@ -75,7 +75,7 @@ private void HandleOnClick() Link with class"; private readonly string example4RazorCode = @" -Underlined link"; +Underlined link"; private readonly string example5RazorCode = @" Blank target link