feat(creator): 답글 상세 컴포넌트를 추가한다
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CreatorChannelReplyDetailInputBar: View {
|
||||
@Binding var text: String
|
||||
let isSendEnabled: Bool
|
||||
let isEditing: Bool
|
||||
let onTapSend: () -> Void
|
||||
let onTapCancelEditing: () -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
Rectangle()
|
||||
.fill(Color.gray700)
|
||||
.frame(height: 1)
|
||||
|
||||
HStack(spacing: SodaSpacing.s8) {
|
||||
if isEditing {
|
||||
Button(action: onTapCancelEditing) {
|
||||
Image("ic_close_white")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
TextField(I18n.CreatorChannelReplyDetail.replyPlaceholder, text: $text)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.appFont(size: 15, weight: .regular)
|
||||
.foregroundColor(.white)
|
||||
.accentColor(Color.soda400)
|
||||
.padding(.horizontal, SodaSpacing.s14)
|
||||
.frame(height: 40)
|
||||
.background(Color.gray900)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous))
|
||||
|
||||
Button(action: {
|
||||
guard isSendEnabled else { return }
|
||||
onTapSend()
|
||||
}) {
|
||||
Image(isSendEnabled ? "ic_arrow_up_white" : "ic_arrow_up_gray")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.frame(width: 36, height: 36)
|
||||
.background(isSendEnabled ? Color.soda400 : Color.gray900)
|
||||
.clipShape(Circle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.disabled(isSendEnabled == false)
|
||||
}
|
||||
.padding(.horizontal, SodaSpacing.s14)
|
||||
.frame(height: 60)
|
||||
.background(Color.black)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user