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

32 lines
666 B
Swift
Raw Permalink Normal View History

2023-08-09 16:29:18 +02:00
import SwiftUI
struct SettingsListTextItem: View {
let title: String
let value: String
var body: some View {
VStack(alignment: .leading) {
HStack {
Text(title)
.foregroundColor(.primary)
Spacer()
}
Text(value)
.font(.footnote)
.foregroundColor(.secondary)
.lineLimit(1)
}
.padding()
}
}
struct SettingsListTextItem_Previews: PreviewProvider {
static var previews: some View {
SettingsListTextItem(
title: "Title",
value: "Some longer text")
}
}