콘텐츠 상세

- 소장만, 대여만 가능시 구매하기 버튼 배경색 변경
- 소장만, 대여만 가능시 구매하기 버튼을 터치하면 바로 구매확인 다이얼로그 표시
This commit is contained in:
Yu Sung
2024-11-08 21:06:24 +09:00
parent 696aed5c00
commit f6ae14d614
5 changed files with 87 additions and 80 deletions

View File

@@ -10,7 +10,8 @@ import SwiftUI
struct ContentDetailPurchaseButton: View {
let price: Int
let isOnlyRental: Bool
let title: String
let backgroundColor: Color
var body: some View {
HStack(spacing: 0) {
@@ -29,13 +30,13 @@ struct ContentDetailPurchaseButton: View {
.font(.custom(Font.light.rawValue, size: 12))
.foregroundColor(.white)
Text(isOnlyRental ? " 대여하기" : " 구매하기")
Text(title)
.font(.custom(Font.bold.rawValue, size: 14.7))
.foregroundColor(.white)
}
.frame(maxWidth: .infinity)
.frame(height: 48.7)
.background(Color.button)
.background(backgroundColor)
.cornerRadius(5.3)
.padding(.top, 18.3)
}