
- 한정판인 경우 대여/소장 선택 다이얼로그를 생략하고 바로 구매확인 다이얼로그가 나오도록 수정 - 한정판이 매진된 경우 구매버튼 비활성화 및 '해당 콘텐츠가 매진되었습니다.' 문구 표시
41 lines
1.0 KiB
Swift
41 lines
1.0 KiB
Swift
//
|
|
// ContentDetailPurchaseButton.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/13.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentDetailPurchaseButton: View {
|
|
|
|
let price: Int
|
|
let isOnlyRental: Bool
|
|
|
|
var body: some View {
|
|
HStack(spacing: 0) {
|
|
Image("ic_can")
|
|
.resizable()
|
|
.frame(width: 16.7, height: 16.7)
|
|
|
|
Text("\(price)")
|
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
|
.foregroundColor(.white)
|
|
.padding(.leading, 5.3)
|
|
|
|
Text("캔으로")
|
|
.font(.custom(Font.light.rawValue, size: 12))
|
|
.foregroundColor(.white)
|
|
|
|
Text(isOnlyRental ? " 대여하기" : " 구매하기")
|
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
|
.foregroundColor(.white)
|
|
}
|
|
.frame(maxWidth: .infinity)
|
|
.frame(height: 48.7)
|
|
.background(Color.button)
|
|
.cornerRadius(5.3)
|
|
.padding(.top, 18.3)
|
|
}
|
|
}
|