diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchor.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchor.razor
index 0b75051ea0..6a426d7260 100644
--- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchor.razor
+++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchor.razor
@@ -1,4 +1,5 @@
@namespace NimbleBlazor
+@inherits NimbleAnchorBase
- /// The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Href { get; set; }
-
- ///
- /// Hints at the human language of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? HrefLang { get; set; }
-
- ///
- /// A space-separated list of URLs. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Ping { get; set; }
-
- ///
- /// How much of the referrer to send when following the link. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? ReferrerPolicy { get; set; }
-
- ///
- /// The relationship of the linked URL as space-separated link types. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Rel { get; set; }
-
- ///
- /// Where to display the linked URL, as the name for a browsing context. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Target { get; set; }
-
- ///
- /// Hints at the linked URL's format with a MIME type. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Type { get; set; }
-
///
/// Whether the text underline is hidden.
///
diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorButton.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorButton.razor
index 1cf0f671bc..183feba89d 100644
--- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorButton.razor
+++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorButton.razor
@@ -1,4 +1,5 @@
@namespace NimbleBlazor
+@inherits NimbleAnchorBase
- /// The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Href { get; set; }
-
- ///
- /// Hints at the human language of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? HrefLang { get; set; }
-
- ///
- /// A space-separated list of URLs. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Ping { get; set; }
-
- ///
- /// How much of the referrer to send when following the link. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? ReferrerPolicy { get; set; }
-
- ///
- /// The relationship of the linked URL as space-separated link types. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Rel { get; set; }
-
- ///
- /// Where to display the linked URL, as the name for a browsing context. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Target { get; set; }
-
- ///
- /// Hints at the linked URL's format with a MIME type. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Type { get; set; }
-
///
/// The appearance mode of the button.
///
diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor
new file mode 100644
index 0000000000..23b8840ad9
--- /dev/null
+++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor
@@ -0,0 +1,14 @@
+@namespace NimbleBlazor
+@inherits NimbleAnchorBase
+
+ @ChildContent
+
diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor.cs b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor.cs
new file mode 100644
index 0000000000..6d0d489c10
--- /dev/null
+++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorMenuItem.razor.cs
@@ -0,0 +1,24 @@
+using Microsoft.AspNetCore.Components;
+
+namespace NimbleBlazor;
+
+public partial class NimbleAnchorMenuItem : NimbleAnchorBase
+{
+ ///
+ /// Whether the menu item is disabled.
+ ///
+ [Parameter]
+ public bool? Disabled { get; set; }
+
+ ///
+ /// The child content of the element.
+ ///
+ [Parameter]
+ public RenderFragment? ChildContent { get; set; }
+
+ ///
+ /// Any additional attributes that did not match known properties.
+ ///
+ [Parameter(CaptureUnmatchedValues = true)]
+ public IDictionary? AdditionalAttributes { get; set; }
+}
diff --git a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorTab.razor b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorTab.razor
index f36a175571..fd03b91645 100644
--- a/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorTab.razor
+++ b/packages/nimble-blazor/NimbleBlazor/Components/NimbleAnchorTab.razor
@@ -1,4 +1,5 @@
@namespace NimbleBlazor
+@inherits NimbleAnchorBase
/// A link styled as a tab
///
-public partial class NimbleAnchorTab : ComponentBase
+public partial class NimbleAnchorTab : NimbleAnchorBase
{
- ///
- /// The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Href { get; set; }
-
- ///
- /// Hints at the human language of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? HrefLang { get; set; }
-
- ///
- /// A space-separated list of URLs. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Ping { get; set; }
-
- ///
- /// How much of the referrer to send when following the link. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? ReferrerPolicy { get; set; }
-
- ///
- /// The relationship of the linked URL as space-separated link types. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Rel { get; set; }
-
- ///
- /// Where to display the linked URL, as the name for a browsing context. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Target { get; set; }
-
- ///
- /// Hints at the linked URL's format with a MIME type. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
- ///
- [Parameter]
- public string? Type { get; set; }
-
///
/// The child content of the element.
///
diff --git a/packages/nimble-blazor/NimbleBlazor/NimbleAnchorBase.cs b/packages/nimble-blazor/NimbleBlazor/NimbleAnchorBase.cs
new file mode 100644
index 0000000000..0d61a81072
--- /dev/null
+++ b/packages/nimble-blazor/NimbleBlazor/NimbleAnchorBase.cs
@@ -0,0 +1,48 @@
+using Microsoft.AspNetCore.Components;
+
+namespace NimbleBlazor;
+
+public abstract class NimbleAnchorBase : ComponentBase
+{
+ ///
+ /// The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? Href { get; set; }
+
+ ///
+ /// Hints at the human language of the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? HrefLang { get; set; }
+
+ ///
+ /// A space-separated list of URLs. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? Ping { get; set; }
+
+ ///
+ /// How much of the referrer to send when following the link. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? ReferrerPolicy { get; set; }
+
+ ///
+ /// The relationship of the linked URL as space-separated link types. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? Rel { get; set; }
+
+ ///
+ /// Where to display the linked URL, as the name for a browsing context. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? Target { get; set; }
+
+ ///
+ /// Hints at the linked URL's format with a MIME type. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a for more information.
+ ///
+ [Parameter]
+ public string? Type { get; set; }
+}
\ No newline at end of file
diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorButtonTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorButtonTests.cs
index d547542cce..7cb356c9dc 100644
--- a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorButtonTests.cs
+++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorButtonTests.cs
@@ -8,7 +8,7 @@ namespace NimbleBlazor.Tests.Unit.Components;
///
/// Tests for .
///
-public class NimbleAnchorButtonTests
+public class NimbleAnchorButtonTests : NimbleAnchorBaseTests
{
[Fact]
public void NimbleAnchorButton_Render_HasAnchorButtonMarkup()
diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorMenuItemTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorMenuItemTests.cs
new file mode 100644
index 0000000000..4083c7d666
--- /dev/null
+++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorMenuItemTests.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Linq.Expressions;
+using Bunit;
+using Xunit;
+
+namespace NimbleBlazor.Tests.Unit.Components;
+
+///
+/// Tests for .
+///
+public class NimbleAnchorMenuItemTests : NimbleAnchorBaseTests
+{
+ [Fact]
+ public void NimbleAnchorMenuItem_Render_HasAnchorMenuItemMarkup()
+ {
+ var context = new TestContext();
+ context.JSInterop.Mode = JSRuntimeMode.Loose;
+ var expectedMarkup = "nimble-anchor-menu-item";
+
+ var menuItem = context.RenderComponent();
+
+ Assert.Contains(expectedMarkup, menuItem.Markup);
+ }
+
+ [Fact]
+ public void AnchorMenuItemDisabled_AttributeIsSet()
+ {
+ var anchorMenuItem = RenderWithPropertySet(x => x.Disabled, true);
+
+ Assert.Contains("disabled", anchorMenuItem.Markup);
+ }
+
+ private IRenderedComponent RenderWithPropertySet(Expression> propertyGetter, TProperty propertyValue)
+ {
+ var context = new TestContext();
+ context.JSInterop.Mode = JSRuntimeMode.Loose;
+ return context.RenderComponent(p => p.Add(propertyGetter, propertyValue));
+ }
+}
diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTabTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTabTests.cs
index bce6529089..3705e41f15 100644
--- a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTabTests.cs
+++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTabTests.cs
@@ -8,7 +8,7 @@ namespace NimbleBlazor.Tests.Unit.Components;
///
/// Tests for .
///
-public class NimbleAnchorTabTests
+public class NimbleAnchorTabTests : NimbleAnchorBaseTests
{
[Fact]
public void NimbleAnchorTab_Render_HasAnchorTabMarkup()
@@ -22,62 +22,6 @@ public void NimbleAnchorTab_Render_HasAnchorTabMarkup()
Assert.Contains(expectedMarkup, menuItem.Markup);
}
- [Fact]
- public void AnchorTabHref_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.Href, "foo");
-
- Assert.Contains("href=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabHrefLang_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.HrefLang, "foo");
-
- Assert.Contains("hreflang=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabPing_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.Ping, "foo");
-
- Assert.Contains("ping=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabReferrerPolicy_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.ReferrerPolicy, "foo");
-
- Assert.Contains("referrerpolicy=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabRel_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.Rel, "foo");
-
- Assert.Contains("rel=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabTarget_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.Target, "foo");
-
- Assert.Contains("target=\"foo\"", anchorTab.Markup);
- }
-
- [Fact]
- public void AnchorTabType_AttributeIsSet()
- {
- var anchorTab = RenderWithPropertySet(x => x.Type, "foo");
-
- Assert.Contains("type=\"foo\"", anchorTab.Markup);
- }
-
[Fact]
public void AnchorTabDisabled_AttributeIsSet()
{
diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTests.cs
index f3e8d1e194..476d6dfd51 100644
--- a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTests.cs
+++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/Components/NimbleAnchorTests.cs
@@ -8,7 +8,7 @@ namespace NimbleBlazor.Tests.Unit.Components;
///
/// Tests for
///
-public class NimbleAnchorTests
+public class NimbleAnchorTests : NimbleAnchorBaseTests
{
[Fact]
public void NimbleAnchor_Rendered_HasAnchorMarkup()
diff --git a/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs
new file mode 100644
index 0000000000..01b3449921
--- /dev/null
+++ b/packages/nimble-blazor/Tests/NimbleBlazor.Tests/Unit/NimbleAnchorBaseTests.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using Bunit;
+using Xunit;
+
+namespace NimbleBlazor.Tests.Unit;
+
+///
+/// Tests for .
+///
+public abstract class NimbleAnchorBaseTests where T : NimbleAnchorBase
+{
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1000:Do not declare static members on generic types", Justification = "Static needed for MemberData of Theory")]
+ public static IEnumerable