2023-12-28 16:03:16 +01:00
|
|
|
import AppAccount
|
|
|
|
import DesignSystem
|
2024-02-14 12:48:14 +01:00
|
|
|
import Env
|
|
|
|
import SwiftUI
|
2023-12-28 16:03:16 +01:00
|
|
|
|
|
|
|
@MainActor
|
|
|
|
struct NavigationSheet<Content: View>: View {
|
|
|
|
@Environment(\.dismiss) private var dismiss
|
2024-02-14 12:48:14 +01:00
|
|
|
|
2023-12-28 16:03:16 +01:00
|
|
|
var content: () -> Content
|
2024-02-14 12:48:14 +01:00
|
|
|
|
2023-12-28 16:03:16 +01:00
|
|
|
init(@ViewBuilder content: @escaping () -> Content) {
|
|
|
|
self.content = content
|
|
|
|
}
|
2024-02-14 12:48:14 +01:00
|
|
|
|
2023-12-28 16:03:16 +01:00
|
|
|
var body: some View {
|
|
|
|
NavigationStack {
|
|
|
|
content()
|
|
|
|
.toolbar {
|
2024-03-26 15:49:43 +01:00
|
|
|
CloseToolbarItem()
|
2023-12-28 16:03:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|