Skip to content

Commit 3e9d9d7

Browse files
authored
Update layout demo image and enhance layout parameters (#1234)
Updated Demos_URL_Layout to use layout.png and added the new image file. Improved BlazorBootstrapLayout parameters with XML docs, [AddedVersion], [DefaultValue], and [Description] attributes for better API documentation and clarity. Explicitly set default values for footer and header CSS class parameters.
1 parent 7d9ead7 commit 3e9d9d7

File tree

3 files changed

+94
-9
lines changed

3 files changed

+94
-9
lines changed

BlazorBootstrap.Demo.RCL/Constants/DemoScreenshotSrcConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class DemoScreenshotSrcConstants
1010
public const string Home = DemoScreenshotSrcPrefix + "home.png";
1111

1212
// Layout
13-
public const string Demos_URL_Layout = DemoScreenshotSrcPrefix + "home.png";
13+
public const string Demos_URL_Layout = DemoScreenshotSrcPrefix + "layout.png";
1414

1515
// Content
1616
public const string Demos_URL_Icons = DemoScreenshotSrcPrefix + "icons.png";
20.4 KB
Loading

blazorbootstrap/Components/Layout/BlazorBootstrapLayout.razor.cs

Lines changed: 93 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,81 @@ public partial class BlazorBootstrapLayout : BlazorBootstrapLayoutComponentBase
66

77
protected override string? ClassNames => BuildClassNames(Class, ("bb-page", true));
88

9-
[Parameter] public RenderFragment? ContentSection { get; set; }
10-
[Parameter] public string? ContentSectionCssClass { get; set; }
9+
/// <summary>
10+
/// Gets or sets the content section.
11+
/// <para>
12+
/// Default value is <see langword="null"/>.
13+
/// </para>
14+
/// </summary>
15+
[AddedVersion("3.2.0")]
16+
[DefaultValue(null)]
17+
[Description("Gets or sets the content section.")]
18+
[Parameter]
19+
public RenderFragment? ContentSection { get; set; }
20+
21+
/// <summary>
22+
/// Gets or sets the CSS class for content section.
23+
/// <para>
24+
/// Default value is <see langword="null"/>.
25+
/// </para>
26+
/// </summary>
27+
[AddedVersion("3.2.0")]
28+
[DefaultValue(null)]
29+
[Description("Gets or sets the CSS class for content section.")]
30+
[Parameter]
31+
public string? ContentSectionCssClass { get; set; }
32+
1133
protected string? ContentSectionCssClassNames => BuildClassNames(ContentSectionCssClass, ("p-4", true));
1234

13-
[Parameter] public RenderFragment? FooterSection { get; set; }
14-
[Parameter] public string? FooterSectionCssClass { get; set; } = "bg-body-tertiary";
35+
/// <summary>
36+
/// Gets or sets the footer section.
37+
/// <para>
38+
/// Default value is <see langword="null"/>.
39+
/// </para>
40+
/// </summary>
41+
[AddedVersion("3.2.0")]
42+
[DefaultValue(null)]
43+
[Description("Gets or sets the footer section.")]
44+
[Parameter]
45+
public RenderFragment? FooterSection { get; set; }
46+
47+
/// <summary>
48+
/// Gets or sets the CSS class applied to the footer section of the component.
49+
/// <para>
50+
/// Default value is <see langword="null"/>.
51+
/// </para>
52+
/// </summary>
53+
[AddedVersion("3.2.0")]
54+
[DefaultValue("bg-body-tertiary")]
55+
[Description("Gets or sets the CSS class applied to the footer section of the component.")]
56+
[Parameter]
57+
public string FooterSectionCssClass { get; set; } = "bg-body-tertiary";
58+
1559
protected string? FooterSectionCssClassNames => BuildClassNames(FooterSectionCssClass, ("bb-footer p-4", true));
1660

17-
[Parameter] public RenderFragment? HeaderSection { get; set; }
18-
[Parameter] public string? HeaderSectionCssClass { get; set; } = "d-flex justify-content-end";
61+
/// <summary>
62+
/// Gets or sets the header section.
63+
/// <para>
64+
/// Default value is <see langword="null"/>.
65+
/// </para>
66+
/// </summary>
67+
[AddedVersion("3.2.0")]
68+
[DefaultValue(null)]
69+
[Description("Gets or sets the header section.")]
70+
[Parameter]
71+
public RenderFragment? HeaderSection { get; set; }
72+
73+
/// <summary>
74+
/// Gets or sets the CSS class applied to the header section of the component.
75+
/// <para>
76+
/// Default value is <see langword="null"/>.
77+
/// </para>
78+
/// </summary>
79+
[AddedVersion("3.2.0")]
80+
[DefaultValue("d-flex justify-content-end")]
81+
[Description("Gets or sets the CSS class applied to the header section of the component.")]
82+
[Parameter]
83+
public string HeaderSectionCssClass { get; set; } = "d-flex justify-content-end";
1984

2085
protected string? HeaderSectionCssClassNames =>
2186
BuildClassNames(
@@ -25,9 +90,29 @@ public partial class BlazorBootstrapLayout : BlazorBootstrapLayoutComponentBase
2590
("px-4", true)
2691
);
2792

28-
[Parameter] public bool StickyHeader { get; set; }
93+
/// <summary>
94+
/// Gets or sets a value indicating whether the header section is sticky.
95+
/// <para>
96+
/// Default value is <see langword="false"/>.
97+
/// </para>
98+
/// </summary>
99+
[AddedVersion("3.2.0")]
100+
[DefaultValue(false)]
101+
[Description("Gets or sets a value indicating whether the header section is sticky.")]
102+
[Parameter]
103+
public bool StickyHeader { get; set; }
29104

30-
[Parameter] public RenderFragment? SidebarSection { get; set; }
105+
/// <summary>
106+
/// Gets or sets the sidebar section.
107+
/// <para>
108+
/// Default value is <see langword="null"/>.
109+
/// </para>
110+
/// </summary>
111+
[AddedVersion("3.2.0")]
112+
[DefaultValue(null)]
113+
[Description("Gets or sets the sidebar section.")]
114+
[Parameter]
115+
public RenderFragment? SidebarSection { get; set; }
31116

32117
#endregion
33118
}

0 commit comments

Comments
 (0)