Unified detail views, model
This commit is contained in:
@ -2,22 +2,17 @@ import SwiftUI
|
||||
|
||||
struct IntegerPropertyView: View {
|
||||
|
||||
let title: LocalizedStringKey
|
||||
|
||||
@Binding
|
||||
var value: Int
|
||||
|
||||
let title: String
|
||||
|
||||
let footer: String
|
||||
let footer: LocalizedStringKey
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text(title)
|
||||
.font(.headline)
|
||||
GenericPropertyView(title: title, footer: footer) {
|
||||
IntegerField("", number: $value)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
Text(footer)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(.bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user