31 lines
721 B
Swift
31 lines
721 B
Swift
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())
|
|
}
|
|
}
|
|
|
|
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.")
|
|
}
|
|
}
|