오디션 메인
- 페이지 추가
This commit is contained in:
49
SodaLive/Sources/Audition/AuditionItemView.swift
Normal file
49
SodaLive/Sources/Audition/AuditionItemView.swift
Normal file
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// AuditionItemView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 1/6/25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Kingfisher
|
||||
|
||||
struct AuditionItemView: View {
|
||||
|
||||
let item: GetAuditionListItem
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
ZStack {
|
||||
KFImage(URL(string: item.imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 1000, height: 530))
|
||||
.resizable()
|
||||
.aspectRatio(1000/530, contentMode: .fit)
|
||||
.frame(maxWidth: .infinity)
|
||||
.overlay(
|
||||
Color.black
|
||||
.opacity(item.isOff ? 0.7 : 0.0)
|
||||
)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
Text(item.title)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
.lineLimit(1)
|
||||
.truncationMode(.tail)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
AuditionItemView(
|
||||
item: GetAuditionListItem(
|
||||
id: 1,
|
||||
title: "[원작] 성인식",
|
||||
imageUrl: "https://test-cf.sodalive.net/audition/production/3/audition-aa934579-c01a-4da2-89fd-cce70d51c612-4267-1735908116928",
|
||||
isOff: false
|
||||
)
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user