32 lines
666 B
Swift
32 lines
666 B
Swift
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")
|
|
}
|
|
}
|