44 lines
1.3 KiB
Swift
44 lines
1.3 KiB
Swift
import SwiftUI
|
|
|
|
struct GiftInfoSectionView<Content: View>: View {
|
|
let title: String
|
|
@ViewBuilder let content: Content
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: SodaSpacing.s24) {
|
|
Text(title)
|
|
.appFont(.body1)
|
|
.foregroundColor(.white)
|
|
.accessibilityAddTraits(.isHeader)
|
|
|
|
VStack(alignment: .leading, spacing: SodaSpacing.s14) {
|
|
content
|
|
}
|
|
.padding(SodaSpacing.s14)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.background(Color.gray900)
|
|
.clipShape(RoundedRectangle(cornerRadius: SodaRadius.r14))
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
}
|
|
}
|
|
|
|
struct GiftInfoRow: View {
|
|
let title: String
|
|
let value: String
|
|
|
|
var body: some View {
|
|
HStack(alignment: .top, spacing: SodaSpacing.s24) {
|
|
Text(title)
|
|
.foregroundColor(.gray500)
|
|
.frame(width: SodaSpacing.s48 + SodaSpacing.s24, alignment: .leading)
|
|
Text(value)
|
|
.foregroundColor(.white)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
}
|
|
.appFont(.body6)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.accessibilityElement(children: .combine)
|
|
}
|
|
}
|