feat(creator): 후원 탭 UI 조각을 추가한다
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CreatorChannelDonationEmptyView: View {
|
||||
let showsDonateButton: Bool
|
||||
let onTapDonate: () -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: SodaSpacing.s20) {
|
||||
Text("아직 후원이 없습니다.\n처음으로 크리에이터를 후원해 보세요!")
|
||||
.appFont(size: 16, weight: .medium)
|
||||
.foregroundColor(Color.gray500)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineSpacing(SodaSpacing.s4)
|
||||
|
||||
if showsDonateButton {
|
||||
Button(action: onTapDonate) {
|
||||
HStack(spacing: SodaSpacing.s6) {
|
||||
Image("ic_new_donation")
|
||||
.resizable()
|
||||
.renderingMode(.template)
|
||||
.foregroundColor(.white)
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("후원하기")
|
||||
.appFont(size: 16, weight: .medium)
|
||||
.foregroundColor(.white)
|
||||
.lineLimit(1)
|
||||
}
|
||||
.padding(.horizontal, SodaSpacing.s20)
|
||||
.frame(height: 44)
|
||||
.background(Color.soda400)
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 48)
|
||||
}
|
||||
}
|
||||
|
||||
struct CreatorChannelDonationEmptyView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CreatorChannelDonationEmptyView(showsDonateButton: true, onTapDonate: {})
|
||||
.background(Color.black)
|
||||
.previewLayout(.sizeThatFits)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user