only remote crypto kit
This commit is contained in:
@@ -47,6 +47,8 @@ class LCENavigationState: ObservableObject {
|
||||
@Published var title: (any View) = Text("")
|
||||
/// The subtitle view of the navigation bar.
|
||||
@Published var subTitle: (any View) = Text("")
|
||||
/// The background color of the navigation bar.
|
||||
@Published var navigationBarBackgroundColor: Color = .clear
|
||||
}
|
||||
|
||||
/// `LCENavigationView` is a SwiftUI `View` that provides a customizable navigation bar.
|
||||
@@ -79,7 +81,7 @@ public struct LCENavigationView<Content: View>: View {
|
||||
|
||||
/// The body of the `LCENavigationView`.
|
||||
public var body: some View {
|
||||
VStack {
|
||||
VStack(spacing: 0) {
|
||||
if !state.hideNavigationBar {
|
||||
NavigationBarView
|
||||
}
|
||||
@@ -100,7 +102,7 @@ public struct LCENavigationView<Content: View>: View {
|
||||
.font(.headline)
|
||||
.padding()
|
||||
.background {
|
||||
Color.clear.ignoresSafeArea(edges: .top)
|
||||
state.navigationBarBackgroundColor.ignoresSafeArea(edges: .top)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,6 +219,14 @@ public struct LCENavigationView<Content: View>: View {
|
||||
state.hideNavigationBar = hide
|
||||
return self
|
||||
}
|
||||
|
||||
/// Sets the background color for the navigation bar.
|
||||
/// - Parameter color: The color to use as the navigation bar background.
|
||||
/// - Returns: The `LCENavigationView` instance for chaining.
|
||||
public func setNavigationBarBackgroundColor(_ color: Color) -> LCENavigationView {
|
||||
state.navigationBarBackgroundColor = color
|
||||
return self
|
||||
}
|
||||
}
|
||||
|
||||
/// Extension to `FormatStyle` to format any value as a string.
|
||||
|
||||
Reference in New Issue
Block a user