콘텐츠 메인
- 홈 UI 페이지 생성
This commit is contained in:
54
SodaLive/Sources/Content/Main/V2/ContentCreatorView.swift
Normal file
54
SodaLive/Sources/Content/Main/V2/ContentCreatorView.swift
Normal 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"
|
||||
)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user