diff --git a/Documentation/Reference/structs/HeaderBar.md b/Documentation/Reference/structs/HeaderBar.md index 694ce75..ed9e65b 100644 --- a/Documentation/Reference/structs/HeaderBar.md +++ b/Documentation/Reference/structs/HeaderBar.md @@ -29,6 +29,11 @@ Initialize a header bar. - start: The start content. - end: The end content. +### `empty()` + +Initialize an empty header bar. +- Returns: The header bar. + ### `start(start:)` Initialize a header bar with only views at the start. diff --git a/Sources/Adwaita/View/HeaderBar.swift b/Sources/Adwaita/View/HeaderBar.swift index 2061e00..71f26b0 100644 --- a/Sources/Adwaita/View/HeaderBar.swift +++ b/Sources/Adwaita/View/HeaderBar.swift @@ -29,6 +29,12 @@ public struct HeaderBar: Widget { self.end = end() } + /// Initialize an empty header bar. + /// - Returns: The header bar. + public static func empty() -> Self { + .init(start: { }, end: { }) + } + /// Initialize a header bar with only views at the start. /// - Parameter start: The views. /// - Returns: The header bar.