시그니처 ON/OFF 버튼 추가

This commit is contained in:
Yu Sung
2024-05-02 14:45:54 +09:00
parent 3d625a4fa0
commit 86f0d466fa
4 changed files with 45 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ struct LiveRoomInfoGuestView: View {
let isOnBg: Bool
let isOnNotice: Bool
let isOnMenuPan: Bool
let isOnSignature: Bool
let isShowMenuPanButton: Bool
let creatorId: Int
@@ -36,6 +37,7 @@ struct LiveRoomInfoGuestView: View {
let onClickMenuPan: () -> Void
let onClickTotalDonation: () -> Void
let onClickChangeListener: () -> Void
let onClickToggleSignature: () -> Void
var body: some View {
ZStack {
@@ -61,6 +63,18 @@ struct LiveRoomInfoGuestView: View {
) { onClickChangeListener() }
}
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnSignature,
onText: "시그니처 ON",
onTextColor: Color.button,
onStrokeColor: Color.button,
offText: "시그니처 OFF",
offTextColor: Color.graybb,
offStrokeColor: Color.graybb,
strokeWidth: 1,
strokeCornerRadius: 5.3
) { onClickToggleSignature() }
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnBg,
onText: "배경 ON",
@@ -181,6 +195,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
isOnBg: true,
isOnNotice: false,
isOnMenuPan: false,
isOnSignature: false,
isShowMenuPanButton: false,
creatorId: 1,
creatorNickname: "도화",
@@ -217,7 +232,8 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
onClickNotice: {},
onClickMenuPan: {},
onClickTotalDonation: {},
onClickChangeListener: {}
onClickChangeListener: {},
onClickToggleSignature: {}
)
}
}

View File

@@ -17,6 +17,7 @@ struct LiveRoomInfoHostView: View {
let isOnBg: Bool
let isOnNotice: Bool
let isOnMenuPan: Bool
let isOnSignature: Bool
let isShowMenuPanButton: Bool
let creatorId: Int
@@ -37,6 +38,7 @@ struct LiveRoomInfoHostView: View {
let onClickMenuPan: () -> Void
let onClickTotalDonation: () -> Void
let onClickParticipants: () -> Void
let onClickToggleSignature: () -> Void
var body: some View {
ZStack {
@@ -52,6 +54,18 @@ struct LiveRoomInfoHostView: View {
Spacer()
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnSignature,
onText: "시그니처 ON",
onTextColor: Color.button,
onStrokeColor: Color.button,
offText: "시그니처 OFF",
offTextColor: Color.graybb,
offStrokeColor: Color.graybb,
strokeWidth: 1,
strokeCornerRadius: 5.3
) { onClickToggleSignature() }
LiveRoomOverlayStrokeTextToggleButton(
isOn: isOnBg,
onText: "배경 ON",
@@ -197,6 +211,7 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
isOnBg: true,
isOnNotice: true,
isOnMenuPan: false,
isOnSignature: false,
isShowMenuPanButton: false,
creatorId: 1,
creatorNickname: "도화",
@@ -232,7 +247,8 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
onClickNotice: {},
onClickMenuPan: {},
onClickTotalDonation: {},
onClickParticipants: {}
onClickParticipants: {},
onClickToggleSignature: {}
)
}
}