feat(gift): 선물 발송 폼을 추가한다

This commit is contained in:
Yu Sung
2026-10-08 12:32:45 +09:00
parent 0383115ca7
commit c356efbed2
3 changed files with 112 additions and 0 deletions
@@ -0,0 +1,19 @@
import SwiftUI
struct GiftSendBannerView: View {
var body: some View {
VStack(alignment: .leading, spacing: SodaSpacing.s8) {
Text("선물 보내기 베타 서비스 안내")
.appFont(size: 14, weight: .bold)
.foregroundColor(.soda400)
Text("베타 기간 동안은 일부 기능만 제공됩니다. 크리에이터에게 마음을 잘 전할 수 있도록 더 넓어진 선물 보내기로 곧 다시 만나요!")
.appFont(size: 12, weight: .regular)
.foregroundColor(.gray300)
.fixedSize(horizontal: false, vertical: true)
}
.padding(SodaSpacing.s14)
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color.gray900)
.cornerRadius(SodaRadius.r8)
}
}
@@ -0,0 +1,53 @@
import SwiftUI
struct GiftSenderFormView: View {
@Binding var name: String
@Binding var phoneNumber: String
@Binding var zipCode: String
@Binding var address: String
@Binding var addressDetail: String
var body: some View {
VStack(alignment: .leading, spacing: SodaSpacing.s20) {
VStack(alignment: .leading, spacing: SodaSpacing.s4) {
Text("보내는 사람")
.appFont(.heading3)
.foregroundColor(.white)
Text("발송 확인 외의 용도로 사용하지 않으며, 전달이 완료되면 파기됩니다")
.appFont(.caption3)
.foregroundColor(.gray500)
.fixedSize(horizontal: false, vertical: true)
}
field("이름", helper: "택배 발송 시 이름과 동일하게 적어주세요") {
GiftContactTextField(text: $name, rule: .name)
}
field("휴대폰 번호", helper: "문제 발생 시 연락이 가능한 번호를 입력해 주세요") {
GiftContactTextField(text: $phoneNumber, rule: .phoneNumber)
}
SodaAddressInputView(zipCode: $zipCode, address: $address, addressDetail: $addressDetail)
}
}
private func field<Content: View>(
_ title: String,
helper: String,
@ViewBuilder content: () -> Content
) -> some View {
VStack(alignment: .leading, spacing: SodaSpacing.s4) {
Text(title)
.appFont(.body5)
.foregroundColor(.grayee)
content()
.appFont(.body3)
.foregroundColor(.white)
.padding(SodaSpacing.s14)
.background(Color.gray900)
.cornerRadius(SodaRadius.r14)
.accessibilityLabel(title)
Text(helper)
.appFont(.caption3)
.foregroundColor(.gray500)
.fixedSize(horizontal: false, vertical: true)
}
}
}