-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleViewBody.swift
More file actions
43 lines (34 loc) · 1.32 KB
/
Copy pathModuleViewBody.swift
File metadata and controls
43 lines (34 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import SwiftUI
/// Стандартная реализация описания экрана: три слота и настройки шторки.
public struct ModuleViewBody: AnyModuleViewBody {
public let content: AnyView
public var accessoryBox: AccessoryBox?
public var navigationBar: NavigationBar?
public var bottomSheetSettings: BottomSheetSettings
public var accessibilityKey: ModuleAccessibility.Type?
public init(
content: AnyView,
accessoryBox: AccessoryBox? = nil,
navigationBar: NavigationBar? = nil,
bottomSheetSettings: BottomSheetSettings = BottomSheetSettings(),
accessibilityKey: ModuleAccessibility.Type? = nil
) {
self.content = content
self.accessoryBox = accessoryBox
self.navigationBar = navigationBar
self.bottomSheetSettings = bottomSheetSettings
self.accessibilityKey = accessibilityKey
}
public init(_ other: AnyModuleViewBody) {
self.init(
content: other.content,
accessoryBox: other.accessoryBox,
navigationBar: other.navigationBar,
bottomSheetSettings: other.bottomSheetSettings,
accessibilityKey: other.accessibilityKey
)
}
public init(content: some View) {
self.init(content: AnyView(content))
}
}