Add tag overview, improve assets
This commit is contained in:
34
CHDataManagement/Views/Generic/FilePropertyView.swift
Normal file
34
CHDataManagement/Views/Generic/FilePropertyView.swift
Normal file
@ -0,0 +1,34 @@
|
||||
import SwiftUI
|
||||
|
||||
struct FilePropertyView: View {
|
||||
|
||||
let title: String
|
||||
|
||||
let description: String
|
||||
|
||||
@Binding
|
||||
var selectedFile: FileResource?
|
||||
|
||||
@State
|
||||
private var showFileSelectionSheet = false
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
HStack {
|
||||
Text(selectedFile?.id ?? "No file selected")
|
||||
Spacer()
|
||||
Button("Select") {
|
||||
showFileSelectionSheet = true
|
||||
}
|
||||
}
|
||||
Text(description)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom)
|
||||
}
|
||||
.sheet(isPresented: $showFileSelectionSheet) {
|
||||
FileSelectionView(selectedFile: $selectedFile)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user