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

32 lines
741 B
Swift
Raw Normal View History

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