Unified detail views, model

This commit is contained in:
Christoph Hagen
2024-12-16 09:54:21 +01:00
parent 1e67a99866
commit 31d1ecb8bd
57 changed files with 853 additions and 954 deletions

View File

@ -0,0 +1,27 @@
import SwiftUI
struct OptionalTextFieldPropertyView: View {
let title: LocalizedStringKey
@Binding
var text: String?
let prompt: String?
let footer: LocalizedStringKey
init(title: LocalizedStringKey, text: Binding<String?>, prompt: String? = nil, footer: LocalizedStringKey) {
self.title = title
self._text = text
self.prompt = prompt
self.footer = footer
}
var body: some View {
GenericPropertyView(title: title, footer: footer) {
OptionalDescriptionField(text: $text)
.textFieldStyle(.roundedBorder)
}
}
}