콘텐츠 상세 - 콘텐츠 고정/해제 기능 추가

This commit is contained in:
Yu Sung
2024-01-29 15:22:45 +09:00
parent bd818918f3
commit 12d2c09434
14 changed files with 318 additions and 5 deletions

View File

@@ -11,7 +11,10 @@ struct ContentDetailMenuView: View {
@Binding var isShowing: Bool
let isPin: Bool
let isShowCreatorMenu: Bool
let pinAction: () -> Void
let modifyAction: () -> Void
let deleteAction: () -> Void
let reportAction: () -> Void
@@ -28,7 +31,26 @@ struct ContentDetailMenuView: View {
VStack(spacing: 13.3) {
if isShowCreatorMenu {
HStack(spacing: 0) {
HStack(spacing: 13.3) {
Image(isPin ? "ic_pin_cancel" : "ic_pin")
Text(isPin ? "내 채널에 고정 취소" : "내 채널에 고정")
.font(.custom(Font.medium.rawValue, size: 16.7))
.foregroundColor(.white)
Spacer()
}
.padding(.vertical, 8)
.padding(.horizontal, 26.7)
.contentShape(Rectangle())
.onTapGesture {
isShowing = false
pinAction()
}
HStack(spacing: 13.3) {
Image("ic_make_message")
Text("수정")
.font(.custom(Font.medium.rawValue, size: 16.7))
.foregroundColor(.white)
@@ -43,7 +65,9 @@ struct ContentDetailMenuView: View {
modifyAction()
}
HStack(spacing: 0) {
HStack(spacing: 13.3) {
Image("ic_trash_can")
Text("삭제")
.font(.custom(Font.medium.rawValue, size: 16.7))
.foregroundColor(.white)