Files
sodalive-ios/SodaLive/Sources/Content/Playlist/ContentPlaylistItemView.swift
Yu Sung 280e424385 커스텀 폰트 pretendard-medium, gmarket-medium를 사용하고 있던 것을 appFont 모디
파이어를 사용하여 한국어는 pretendard, 그 외에는 시스템 폰트를 사용하도록 수정
2026-01-23 03:09:20 +09:00

65 lines
2.0 KiB
Swift

//
// ContentPlaylistItemView.swift
// SodaLive
//
// Created by klaus on 12/7/24.
//
import SwiftUI
import Kingfisher
struct ContentPlaylistItemView: View {
let item: GetPlaylistsItem
var body: some View {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 11) {
KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 66.7, height: 66.7))
.resizable()
.scaledToFill()
.frame(width: 66.7, height: 66.7, alignment: .center)
.cornerRadius(5.3)
.clipped()
VStack(alignment: .leading, spacing: 7) {
Text(item.title)
.appFont(size: 14.7, weight: .bold)
.foregroundColor(Color.grayd2)
.lineLimit(1)
if !item.desc.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
Text(item.desc)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray90)
.lineLimit(1)
}
Text("\(item.contentCount)")
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray90)
.lineLimit(1)
}
}
Rectangle()
.frame(height: 1)
.foregroundColor(Color.gray55)
}
}
}
#Preview {
ContentPlaylistItemView(
item: GetPlaylistsItem(
id: 1,
title: "토스트",
desc: "테슬라 네",
contentCount: 2,
coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
)
)
}