Files
sodalive-ios/SodaLive/Sources/Live/Room/Dialog/LiveRoomDonationRankingTotalCanView.swift

73 lines
2.2 KiB
Swift

//
// LiveRoomDonationRankingTotalCanView.swift
// SodaLive
//
// Created by klaus on 2023/08/15.
//
import SwiftUI
struct LiveRoomDonationRankingTotalCanView: View {
let totalCan: Int
let totalSecretCan: Int
var body: some View {
HStack(alignment: .center, spacing: 0) {
Text(I18n.CreateLive.sumLabel)
.appFont(size: 13.3, weight: .bold)
.foregroundColor(Color.grayd2)
if totalSecretCan > 0 {
Text(" (")
.appFont(size: 13.3, weight: .medium)
.foregroundColor(Color.grayd2)
Text(I18n.CreateLive.normalLabel)
.appFont(size: 13.3, weight: .medium)
.foregroundColor(Color.button)
Text("/")
.appFont(size: 13.3, weight: .medium)
.foregroundColor(Color.grayd2)
Text(I18n.CreateLive.secretLabel)
.appFont(size: 13.3, weight: .medium)
.foregroundColor(Color(hex: "fedc00"))
Text(")")
.appFont(size: 13.3, weight: .medium)
.foregroundColor(Color.grayd2)
}
Spacer()
Text("\(totalCan)")
.appFont(size: 14, weight: .medium)
.foregroundColor(Color.button)
if totalSecretCan > 0 {
Text("/")
.appFont(size: 14, weight: .medium)
.foregroundColor(Color.white)
Text("\(totalSecretCan)")
.appFont(size: 14, weight: .medium)
.foregroundColor(Color(hex: "fedc00"))
}
Text(I18n.CreateLive.canUnit)
.appFont(size: 10.7, weight: .medium)
.foregroundColor(Color.graybb)
.padding(.leading, 4)
}
.padding(.horizontal, 18.7)
.padding(.vertical, 10.7)
.background(Color.bg)
.cornerRadius(8)
}
}
#Preview {
LiveRoomDonationRankingTotalCanView(totalCan: 10, totalSecretCan: 0)
}