feat(creator): 타이틀 바 닉네임을 표시한다

This commit is contained in:
Yu Sung
2026-07-03 01:43:16 +09:00
parent 527b499c30
commit 069a8cf5e8
3 changed files with 17 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
import SwiftUI
struct CreatorChannelTitleBar: View {
let nickname: String
let isFollow: Bool
let isNotify: Bool
let backgroundProgress: CGFloat
@@ -20,11 +21,13 @@ struct CreatorChannelTitleBar: View {
}
.buttonStyle(.plain)
Text("")
Text(nickname)
.appFont(.heading2)
Spacer(minLength: 0)
.foregroundColor(Color.white)
.lineLimit(1)
.truncationMode(.tail)
.opacity(backgroundProgress >= 1 ? 1 : 0)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(spacing: SodaSpacing.s14) {
followButton
@@ -40,6 +43,7 @@ struct CreatorChannelTitleBar: View {
}
.buttonStyle(.plain)
}
.layoutPriority(1)
}
.padding(.horizontal, SodaSpacing.s14)
.frame(height: 56)
@@ -85,9 +89,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
static var previews: some View {
VStack(spacing: SodaSpacing.s16) {
CreatorChannelTitleBar(
nickname: "Soda Creator Long Nickname Soda Creator Long Nickname",
isFollow: false,
isNotify: false,
backgroundProgress: 0,
backgroundProgress: 1,
onTapBack: {},
onTapFollow: {},
onTapUnfollow: {},
@@ -97,9 +102,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
)
CreatorChannelTitleBar(
nickname: "Soda Creator",
isFollow: true,
isNotify: true,
backgroundProgress: 0,
backgroundProgress: 1,
onTapBack: {},
onTapFollow: {},
onTapUnfollow: {},
@@ -109,9 +115,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
)
CreatorChannelTitleBar(
nickname: "Soda Creator",
isFollow: true,
isNotify: false,
backgroundProgress: 0,
backgroundProgress: 1,
onTapBack: {},
onTapFollow: {},
onTapUnfollow: {},