38 lines
1.3 KiB
Swift
38 lines
1.3 KiB
Swift
import SwiftUI
|
|
|
|
struct CreatorChannelIntroduceSection: View {
|
|
let introduce: String
|
|
|
|
private var trimmedIntroduce: String {
|
|
introduce.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
}
|
|
|
|
var body: some View {
|
|
if !trimmedIntroduce.isEmpty {
|
|
VStack(alignment: .leading, spacing: SodaSpacing.s14) {
|
|
SectionTitle(title: I18n.CreatorChannelHome.introduce)
|
|
|
|
Text(trimmedIntroduce)
|
|
.appFont(size: 16, weight: .regular)
|
|
.foregroundColor(.white)
|
|
.lineSpacing(4)
|
|
.lineLimit(nil)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding(.horizontal, SodaSpacing.s20)
|
|
}
|
|
.padding(.top, SodaSpacing.s20)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct CreatorChannelIntroduceSection_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
CreatorChannelIntroduceSection(
|
|
introduce: "크리에이터가 커뮤니티에 올린 글이 보이는 부분 크리에이터가 커뮤니티에 올린 글이 보이는 부분 크리에이터가 커뮤니티에 올린 글이 보이는 부분"
|
|
)
|
|
.background(Color.black)
|
|
.previewLayout(.sizeThatFits)
|
|
}
|
|
}
|