Sesame-iOS/Sesame-Watch Watch App/Settings/SettingsNumberItemLink.swift

31 lines
721 B
Swift
Raw Normal View History

2023-08-09 16:29:18 +02:00
import SwiftUI
struct SettingsNumberItemLink: View {
let title: String
@Binding
var value: Int
let footnote: String
var body: some View {
NavigationLink {
SettingsNumberInputView(
title: title,
value: $value,
footnote: footnote
)
} label: {
SettingsListTextItem(title: title, value: "\(value)")
}
.buttonStyle(PlainButtonStyle())
}
}
struct SettingsNumberItemLink_Previews: PreviewProvider {
static var previews: some View {
SettingsNumberItemLink(title: "Title", value: .constant(0), footnote: "Some more text explaining the purpose of the text field.")
}
}