콘텐츠 메인

- 홈 UI 페이지 생성
This commit is contained in:
Yu Sung
2025-02-20 23:31:59 +09:00
parent e641636007
commit 48ebc1eaef
35 changed files with 1517 additions and 4 deletions

View File

@@ -0,0 +1,54 @@
//
// ContentCreatorView.swift
// SodaLive
//
// Created by klaus on 2/20/25.
//
import SwiftUI
import Kingfisher
struct ContentCreatorView: View {
let isSelected: Bool
let item: ContentCreatorResponse
var body: some View {
VStack(spacing: 13.3) {
KFImage(URL(string: item.creatorProfileImageUrl))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 60, height: 60))
.resizable()
.frame(width: 60, height: 60)
.clipShape(Circle())
.overlay(
Circle()
.strokeBorder(lineWidth: 3)
.foregroundColor(
.button
.opacity(isSelected ? 1 : 0)
)
)
Text(item.creatorNickname)
.font(.custom(Font.medium.rawValue, size: 11.3))
.foregroundColor(
isSelected ?
Color.button :
Color.graybb
)
}
}
}
#Preview {
ContentCreatorView(
isSelected: true,
item: ContentCreatorResponse(
creatorId: 1,
creatorNickname: "유저1",
creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
)
)
}