40 lines
935 B
Swift
40 lines
935 B
Swift
import SwiftUI
|
|
|
|
struct AttachmentPickerScreen: View {
|
|
@EnvironmentObject var store: AppStore
|
|
|
|
@State private var selectedTab: SharingTab = .media
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
// Background color
|
|
Color.Material.Background.light
|
|
.ignoresSafeArea()
|
|
|
|
// Content
|
|
VStack(spacing: 0) {
|
|
// Header
|
|
SharingHeader()
|
|
|
|
// Pickers
|
|
switch selectedTab {
|
|
case .media:
|
|
SharingMediaPickerView()
|
|
|
|
case .files:
|
|
SharingFilesPickerView()
|
|
|
|
case .location:
|
|
SharingLocationPickerView()
|
|
|
|
case .contacts:
|
|
SharingContactsPickerView()
|
|
}
|
|
|
|
// Tab bar
|
|
SharingTabBar(selectedTab: $selectedTab)
|
|
}
|
|
}
|
|
}
|
|
}
|