feat(gift): 선물 상세 정보를 표시한다
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import SwiftUI
|
||||
|
||||
struct GiftProgressView: View {
|
||||
let progress: [GiftProgressDisplayModel]
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s4) {
|
||||
ForEach(progress, id: \.step) { model in
|
||||
VStack(spacing: SodaSpacing.s12) {
|
||||
Capsule()
|
||||
.fill(model.occurredDateText != nil ? Color.soda400 : Color.gray700)
|
||||
.frame(height: SodaSpacing.s4)
|
||||
.accessibilityHidden(true)
|
||||
|
||||
VStack(spacing: SodaSpacing.s8) {
|
||||
Text(model.step.title)
|
||||
.foregroundColor(model.occurredDateText != nil ? .white : .gray500)
|
||||
if let date = model.occurredDateText {
|
||||
Text(date)
|
||||
.foregroundColor(.gray400)
|
||||
}
|
||||
}
|
||||
.appFont(.caption3)
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .top)
|
||||
}
|
||||
}
|
||||
.padding(SodaSpacing.s14)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(Color.gray900)
|
||||
.clipShape(RoundedRectangle(cornerRadius: SodaRadius.r14))
|
||||
.accessibilityElement(children: .ignore)
|
||||
.accessibilityLabel(progress.enumerated().map { index, model in
|
||||
["\(index + 1)단계", model.step.title, model.occurredDateText,
|
||||
model.occurredDateText != nil ? "완료" : "미완료"]
|
||||
.compactMap { $0 }.joined(separator: ", ")
|
||||
}.joined(separator: "; "))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user