38 lines
1.2 KiB
Swift
38 lines
1.2 KiB
Swift
import SwiftUI
|
|
|
|
struct BlindBoxHeaderBar: View {
|
|
let onMenuTap: () -> Void
|
|
let remainPoints: Int
|
|
@Binding var showLogin: Bool
|
|
|
|
var body: some View {
|
|
HStack {
|
|
Button(action: onMenuTap) {
|
|
Image(systemName: "line.3.horizontal")
|
|
.font(.system(size: 20, weight: .regular))
|
|
.foregroundColor(.primary)
|
|
.padding(13)
|
|
.contentShape(Rectangle())
|
|
}
|
|
.buttonStyle(PlainButtonStyle())
|
|
Spacer()
|
|
NavigationLink(destination: SubscribeView()) {
|
|
Text("\(remainPoints)")
|
|
.font(Typography.font(for: .subtitle))
|
|
.fontWeight(.bold)
|
|
.padding(.horizontal, 12)
|
|
.padding(.vertical, 6)
|
|
.background(Color.black)
|
|
.foregroundColor(.white)
|
|
.cornerRadius(16)
|
|
}
|
|
.padding(.trailing)
|
|
.fullScreenCover(isPresented: $showLogin) {
|
|
LoginView()
|
|
}
|
|
}
|
|
.padding(.horizontal)
|
|
.padding(.top, 20)
|
|
}
|
|
}
|