feat(creator): 채널 헤더를 연결한다
This commit is contained in:
@@ -57,7 +57,8 @@ struct CreatorChannelTitleBar: View {
|
||||
.foregroundColor(Color.white)
|
||||
}
|
||||
}
|
||||
.padding(SodaSpacing.s8)
|
||||
.frame(width: isFollow ? 36 : nil, height: 36)
|
||||
.padding(.horizontal, isFollow ? 0 : SodaSpacing.s12)
|
||||
.background(isFollow ? Color.white : Color.clear)
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
@@ -67,54 +68,53 @@ struct CreatorChannelTitleBar: View {
|
||||
|
||||
private var notifyButton: some View {
|
||||
Button(action: isNotify ? onTapUnnotify : onTapNotify) {
|
||||
Image(isNotify ? "ic_bar_bell_fill" : "ic_bar_bell")
|
||||
Image(isNotify ? "ic_bar_bell_colored" : "ic_bar_bell")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
.frame(width: 36, height: 36)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
struct CreatorChannelTitleBar_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack(spacing: SodaSpacing.s16) {
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: false,
|
||||
isNotify: false,
|
||||
backgroundProgress: 0,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
#Preview {
|
||||
VStack(spacing: SodaSpacing.s16) {
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: false,
|
||||
isNotify: false,
|
||||
backgroundProgress: 0,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: true,
|
||||
isNotify: true,
|
||||
backgroundProgress: 1,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: true,
|
||||
isNotify: true,
|
||||
backgroundProgress: 0,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: true,
|
||||
isNotify: false,
|
||||
backgroundProgress: 1,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
}
|
||||
.background(Color.gray)
|
||||
.previewLayout(.sizeThatFits)
|
||||
CreatorChannelTitleBar(
|
||||
isFollow: true,
|
||||
isNotify: false,
|
||||
backgroundProgress: 0,
|
||||
onTapBack: {},
|
||||
onTapFollow: {},
|
||||
onTapUnfollow: {},
|
||||
onTapNotify: {},
|
||||
onTapUnnotify: {},
|
||||
onTapMore: {}
|
||||
)
|
||||
}
|
||||
.background(Color.gray)
|
||||
.previewLayout(.sizeThatFits)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user