fix(live): 라이브룸 팔로우 버튼 스타일을 정렬한다
This commit is contained in:
@@ -214,10 +214,7 @@ struct LiveRoomInfoGuestView: View {
|
||||
.onTapGesture { onClickTotalDonation() }
|
||||
|
||||
if creatorId != UserDefaults.int(forKey: .userId) {
|
||||
let asset = FollowButtonImageAsset(type: followButtonType)
|
||||
asset.imageView(defaultSize: CGSize(width: 83.3, height: 26.7))
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { onClickFollow() }
|
||||
followButtonView
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,6 +233,41 @@ struct LiveRoomInfoGuestView: View {
|
||||
UIScrollView.appearance().bounces = true
|
||||
}
|
||||
}
|
||||
|
||||
private var followButtonText: String {
|
||||
followButtonType == .follow ? I18n.LiveRoom.follow : I18n.LiveRoom.following
|
||||
}
|
||||
|
||||
private var followButtonIconName: String {
|
||||
switch followButtonType {
|
||||
case .follow:
|
||||
return "ic_live_creator_follow_plus"
|
||||
case .following:
|
||||
return "ic_live_creator_follow_alarm"
|
||||
case .followingNoAlarm:
|
||||
return "ic_live_creator_follow_no_alarm"
|
||||
}
|
||||
}
|
||||
|
||||
private var followButtonView: some View {
|
||||
HStack(spacing: 6.7) {
|
||||
Image(followButtonIconName)
|
||||
.resizable()
|
||||
.frame(width: 12, height: 12)
|
||||
|
||||
Text(followButtonText)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(.graybb)
|
||||
}
|
||||
.padding(.horizontal, 11)
|
||||
.padding(.vertical, 5.3)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 5.3)
|
||||
.stroke(Color.graybb, lineWidth: 1)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { onClickFollow() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
|
||||
Reference in New Issue
Block a user