마이페이지 추가
This commit is contained in:
77
SodaLive/Sources/MyPage/CanCardView.swift
Normal file
77
SodaLive/Sources/MyPage/CanCardView.swift
Normal file
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// CanCardView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/08/10.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CanCardView: View {
|
||||
let data: MyPageResponse
|
||||
let refresh: () -> Void
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 0) {
|
||||
Button(action: {}) {
|
||||
HStack(spacing: 6.7) {
|
||||
Text("\(data.chargeCan + data.rewardCan)")
|
||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Image("ic_can")
|
||||
|
||||
Image("ic_forward")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {}) {
|
||||
HStack(spacing: 7) {
|
||||
Image("ic_coin_w")
|
||||
.resizable()
|
||||
.frame(width: 26.7, height: 26.7)
|
||||
|
||||
Text("충전")
|
||||
.font(.custom(Font.bold.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "fdca2f"))
|
||||
}
|
||||
.padding(.horizontal, 11.3)
|
||||
.padding(.vertical, 7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: CGFloat(16.7))
|
||||
.stroke(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "fdca2f"))
|
||||
)
|
||||
.cornerRadius(16.7)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
.padding(.vertical, 16.7)
|
||||
.background(Color(hex: "222222"))
|
||||
.cornerRadius(16.7)
|
||||
}
|
||||
}
|
||||
|
||||
struct CanCardView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CanCardView(
|
||||
data: MyPageResponse(
|
||||
nickname: "완다 막시모프",
|
||||
profileUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
|
||||
chargeCan: 0,
|
||||
rewardCan: 150,
|
||||
youtubeUrl: "",
|
||||
instagramUrl: "",
|
||||
websiteUrl: "",
|
||||
blogUrl: "",
|
||||
liveReservationCount: 0,
|
||||
isAuth: false
|
||||
),
|
||||
refresh: {}
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user