diff --git a/BlazorBootstrap.Demo.RCL/Components/Layout/DemosMainLayout.razor.cs b/BlazorBootstrap.Demo.RCL/Components/Layout/DemosMainLayout.razor.cs index 8048e01fe..ff436eebf 100644 --- a/BlazorBootstrap.Demo.RCL/Components/Layout/DemosMainLayout.razor.cs +++ b/BlazorBootstrap.Demo.RCL/Components/Layout/DemosMainLayout.razor.cs @@ -102,6 +102,7 @@ internal override IEnumerable GetNavItems() new (){ Id = "700", Text = "Breadcrumb Service", Href = DemoRouteConstants.Demos_URL_BreadcrumbService, IconName = IconName.SegmentedNav, ParentId = "7" }, new (){ Id = "701", Text = "Modal Service", Href = DemoRouteConstants.Demos_URL_ModalService, IconName = IconName.WindowStack, ParentId = "7" }, new (){ Id = "702", Text = "Preload Service", Href = DemoRouteConstants.Demos_URL_PreloadService, IconName = IconName.ArrowRepeat, ParentId = "7" }, + new (){ Id = "703", Text = "Toast Service", Href = DemoRouteConstants.Demos_URL_ToastService, IconName = IconName.InfoCircleFill, ParentId = "7" }, new(){ Id = "19", Text = "Utilities", IconName = IconName.GearWideConnected, IconColor = IconColor.Info }, new (){ Id = "1900", Text = "Color Utility", Href = DemoRouteConstants.Demos_URL_ColorUtils, IconName = IconName.Palette2, ParentId = "19" }, diff --git a/BlazorBootstrap.Demo.RCL/Components/Layout/DocsMainLayout.razor.cs b/BlazorBootstrap.Demo.RCL/Components/Layout/DocsMainLayout.razor.cs index 539b7c4d9..c1b5e241b 100644 --- a/BlazorBootstrap.Demo.RCL/Components/Layout/DocsMainLayout.razor.cs +++ b/BlazorBootstrap.Demo.RCL/Components/Layout/DocsMainLayout.razor.cs @@ -78,6 +78,7 @@ internal override IEnumerable GetNavItems() new (){ Id = "700", Text = "Breadcrumb Service", Href = DemoRouteConstants.Docs_URL_BreadcrumbService, IconName = IconName.SegmentedNav, ParentId = "7" }, new (){ Id = "701", Text = "Modal Service", Href = DemoRouteConstants.Docs_URL_ModalService, IconName = IconName.WindowStack, ParentId = "7" }, new (){ Id = "702", Text = "Preload Service", Href = DemoRouteConstants.Docs_URL_PreloadService, IconName = IconName.ArrowRepeat, ParentId = "7" }, + new (){ Id = "703", Text = "Toast Service", Href = DemoRouteConstants.Docs_URL_ToastService, IconName = IconName.InfoCircleFill, ParentId = "7" }, //new(){ Id = "19", Text = "Utilities", IconName = IconName.GearWideConnected, IconColor = IconColor.Info }, //new (){ Id = "1900", Text = "Color Utility", Href = DemoRouteConstants.Docs_URL_ColorUtils, IconName = IconName.Palette2, ParentId = "19" }, diff --git a/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Services/ToastService/ToastService_Doc_01_Documentation.razor b/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Services/ToastService/ToastService_Doc_01_Documentation.razor new file mode 100644 index 000000000..746f72d18 --- /dev/null +++ b/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Services/ToastService/ToastService_Doc_01_Documentation.razor @@ -0,0 +1,37 @@ +@attribute [Route(pageUrl)] +@layout DocsMainLayout + + + + + +
+ @metaTitle +
+ +
+ +
+ +
+ +
+ +
+ +
+ +@code { + private const string componentName = nameof(ToastService); + private const string pageUrl = DemoRouteConstants.Docs_URL_ToastService; + private const string pageTitle = componentName; + private const string pageDescription = $"This documentation provides a comprehensive reference for the {componentName} component, guiding you through its configuration options."; + private const string metaTitle = $"Blazor {componentName} Component"; + private const string metaDescription = $"This documentation provides a comprehensive reference for the {componentName} component, guiding you through its configuration options."; + private const string imageUrl = DemoScreenshotSrcConstants.Demos_URL_Toasts; +} \ No newline at end of file diff --git a/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Tooltips/Tooltips_Doc_01_Documentation.razor b/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Tooltips/Tooltips_Doc_01_Documentation.razor index 2ed0ad215..0df5f282f 100644 --- a/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Tooltips/Tooltips_Doc_01_Documentation.razor +++ b/BlazorBootstrap.Demo.RCL/Components/Pages/Docs/Tooltips/Tooltips_Doc_01_Documentation.razor @@ -14,10 +14,18 @@ @metaTitle -
+
+
+ +
+ +
+ +
+ @code { private const string componentName = nameof(Tooltip); private const string pageUrl = DemoRouteConstants.Docs_URL_Tooltips; diff --git a/BlazorBootstrap.Demo.RCL/Constants/DemoRouteConstants.cs b/BlazorBootstrap.Demo.RCL/Constants/DemoRouteConstants.cs index dbf0368f9..594c680fb 100644 --- a/BlazorBootstrap.Demo.RCL/Constants/DemoRouteConstants.cs +++ b/BlazorBootstrap.Demo.RCL/Constants/DemoRouteConstants.cs @@ -111,6 +111,7 @@ public static class DemoRouteConstants public const string Demos_URL_BreadcrumbService = Demos_URL_Services_Prefix + "/breadcrumb-service"; public const string Demos_URL_ModalService = Demos_URL_Services_Prefix + "/modal-service"; public const string Demos_URL_PreloadService = Demos_URL_Services_Prefix + "/preload-service"; + public const string Demos_URL_ToastService = Demos_URL_Services_Prefix + "/toast-service"; // Utilities public const string Demos_URL_Utils_Prefix = Demos_URL_Prefix + "/utils"; @@ -200,6 +201,7 @@ public static class DemoRouteConstants public const string Docs_URL_BreadcrumbService = Docs_URL_Services_Prefix + "/breadcrumb-service"; public const string Docs_URL_ModalService = Docs_URL_Services_Prefix + "/modal-service"; public const string Docs_URL_PreloadService = Docs_URL_Services_Prefix + "/preload-service"; + public const string Docs_URL_ToastService = Docs_URL_Services_Prefix + "/toast-service"; // Utilities public const string Docs_URL_Utils_Prefix = Docs_URL_Prefix + "/utils"; diff --git a/blazorbootstrap/Components/Tooltip/Tooltip.razor.cs b/blazorbootstrap/Components/Tooltip/Tooltip.razor.cs index cd4ff721c..fb34e959c 100644 --- a/blazorbootstrap/Components/Tooltip/Tooltip.razor.cs +++ b/blazorbootstrap/Components/Tooltip/Tooltip.razor.cs @@ -81,19 +81,25 @@ public async Task ShowAsync() /// /// Gets or sets the content to be rendered within the component. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Gets or sets the content to be rendered within the component.")] [Parameter] - public RenderFragment ChildContent { get; set; } = default!; + public RenderFragment? ChildContent { get; set; } /// /// Gets or sets the tooltip color. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.10.0")] + [DefaultValue(TooltipColor.None)] + [Description("Gets or sets the tooltip color.")] [Parameter] public TooltipColor Color { get; set; } = TooltipColor.None; @@ -101,10 +107,13 @@ public async Task ShowAsync() /// /// Gets or sets a value indicating whether to display the content as HTML instead of text. + /// + /// Default value is . + /// /// - /// - /// Default value is false. - /// + [AddedVersion("2.1.0")] + [DefaultValue(false)] + [Description("Gets or sets a value indicating whether to display the content as HTML instead of text.")] [Parameter] public bool IsHtml { get; set; } @@ -112,22 +121,28 @@ public async Task ShowAsync() /// /// Gets or sets the tooltip placement. - /// - /// + /// /// Default value is . - /// + /// + /// + [AddedVersion("1.0.0")] + [DefaultValue(TooltipPlacement.Top)] + [Description("Gets or sets the tooltip placement.")] [Parameter] public TooltipPlacement Placement { get; set; } = TooltipPlacement.Top; /// /// Displays informative text when users hover, focus, or tap an element. + /// + /// Default value is . + /// /// - /// - /// Default value is null. - /// - [Parameter] + [AddedVersion("1.0.0")] + [DefaultValue(null)] + [Description("Displays informative text when users hover, focus, or tap an element.")] [EditorRequired] - public string Title { get; set; } = default!; + [Parameter] + public string? Title { get; set; } #endregion } diff --git a/blazorbootstrap/Enums/ToastsPlacement.cs b/blazorbootstrap/Enums/ToastsPlacement.cs index d1757e636..2aee5fd11 100644 --- a/blazorbootstrap/Enums/ToastsPlacement.cs +++ b/blazorbootstrap/Enums/ToastsPlacement.cs @@ -2,6 +2,11 @@ public enum ToastsPlacement { + /// + /// Top left + /// + [AddedVersion("1.0.0")] + [Description("Top left")] TopLeft, /// diff --git a/blazorbootstrap/Services/ToastService.cs b/blazorbootstrap/Services/ToastService.cs index 4e18c94eb..78b34e4d7 100644 --- a/blazorbootstrap/Services/ToastService.cs +++ b/blazorbootstrap/Services/ToastService.cs @@ -10,6 +10,14 @@ public class ToastService #region Methods + /// + /// Notifies subscribers of a new toast message event. + /// + /// If no subscribers are registered, this method has no effect. This method is typically used to + /// display transient notifications to users. + /// The toast message to be delivered to all registered listeners. Cannot be null. + [AddedVersion("1.0.0")] + [Description("Notifies subscribers of a new toast message event.")] public void Notify(ToastMessage toastMessage) => OnNotify?.Invoke(toastMessage); #endregion