Files
sodalive-ios/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaNoticeItemView.swift
Yu Sung 2576c851ee feat(chat-room) 채팅방 API
- 채팅방 입장 API 연동
- 채팅 쿼터가 없을 때 표시할 UI 추가
2025-09-04 04:25:28 +09:00

66 lines
1.9 KiB
Swift

//
// ChatQuotaNoticeItemView.swift
// SodaLive
//
// Created by klaus on 9/2/25.
//
import SwiftUI
struct ChatQuotaNoticeItemView: View {
let remainingTime: String
let purchase: () -> Void
var body: some View {
VStack(spacing: 10) {
VStack(spacing: 8) {
Image("ic_time")
.resizable()
.frame(width: 30, height: 30)
Text(remainingTime)
.font(.custom(Font.preBold.rawValue, size: 18))
.foregroundColor(.white)
Text("기다리면 무료 이용이 가능합니다.")
.font(.custom(Font.preBold.rawValue, size: 18))
.foregroundColor(.white)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 15)
.background(Color(hex: "EC8280"))
.cornerRadius(10)
HStack(spacing: 4) {
Image("ic_can")
Text("30")
.font(.custom(Font.preBold.rawValue, size: 24))
.foregroundColor(Color(hex: "263238"))
Text("결제하고 바로 대화 시작")
.font(.custom(Font.preBold.rawValue, size: 24))
.foregroundColor(Color(hex: "263238"))
.padding(.leading, 4)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 12)
.background(Color(hex: "B5E7FA"))
.cornerRadius(30)
.overlay {
RoundedRectangle(cornerRadius: 30)
.stroke(lineWidth: 1)
.foregroundColor(Color.button)
}
.onTapGesture {
purchase()
}
}
}
}
#Preview {
ChatQuotaNoticeItemView(remainingTime: "05:59:55") {}
}