Add navigation settings, fix page generation
This commit is contained in:
27
CHDataManagement/Views/Generic/TextFieldPropertyView.swift
Normal file
27
CHDataManagement/Views/Generic/TextFieldPropertyView.swift
Normal file
@ -0,0 +1,27 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TextFieldPropertyView: 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) {
|
||||
DescriptionField(text: $text)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user