@foreach (var lib in _libraries)
{
@@ -39,11 +39,11 @@
}
diff --git a/Components/Shared/HelpTip.razor b/Components/Shared/HelpTip.razor
new file mode 100644
index 0000000..2f31d3d
--- /dev/null
+++ b/Components/Shared/HelpTip.razor
@@ -0,0 +1,35 @@
+@* Clickable "?" button that reveals an explanatory tooltip. Use to demystify SharePoint
+ jargon for users with limited SharePoint knowledge. Pass the explanation via Text
+ (typically a localized string:
). Click toggles the
+ bubble; it closes on a second click or when focus leaves the button. *@
+
+@if (!string.IsNullOrWhiteSpace(Text))
+{
+
+
+ @Text
+
+}
+
+@code {
+ ///
The explanation shown inside the tooltip bubble.
+ [Parameter] public string? Text { get; set; }
+
+ ///
Use a wider bubble for longer explanations.
+ [Parameter] public bool Wide { get; set; }
+
+ private bool _open;
+
+ private void Toggle() => _open = !_open;
+
+ // Delay the close so a click that moves focus off the button still toggles cleanly,
+ // and so the bubble doesn't vanish before a click on it registers.
+ private async Task Close()
+ {
+ await Task.Delay(150);
+ _open = false;
+ StateHasChanged();
+ }
+}
diff --git a/Components/Shared/LibraryPicker.razor b/Components/Shared/LibraryPicker.razor
index a9b5abc..50acc92 100644
--- a/Components/Shared/LibraryPicker.razor
+++ b/Components/Shared/LibraryPicker.razor
@@ -4,7 +4,7 @@
@* Library name field with a picker: type a title, or click Browse to load and
choose from the libraries on the selected site. *@