forked from AcaMate/AcaMate_iOS
44 lines
1.0 KiB
Swift
44 lines
1.0 KiB
Swift
//
|
|
// TopView.swift
|
|
// AcaMate
|
|
//
|
|
// Created by TAnine on 2/4/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct TopView: View {
|
|
@State var titleName: String = ""
|
|
|
|
var body: some View {
|
|
HStack(alignment: .center, spacing: 0) {
|
|
SimpleBtnView(title: nil, image: Image(.TopBar.face), font: nil, width: 40, height: 40, action: {
|
|
|
|
})
|
|
.padding(EdgeInsets(top: 12, leading: 24, bottom: 12, trailing: 12))
|
|
|
|
Text("\(titleName)")
|
|
.tint(Color(.Text.disabled))
|
|
.font(.nps(font: .bold, size: 20))
|
|
Spacer()
|
|
|
|
SimpleBtnView(title: nil, image: Image(.TopBar.face), font: nil, width: 40, height: 40, action: {
|
|
|
|
})
|
|
.hidden()
|
|
|
|
}
|
|
.background {
|
|
Rectangle()
|
|
.foregroundStyle(Color(.Other.cell))
|
|
.ignoresSafeArea(edges: .top)
|
|
}
|
|
.frame(maxWidth: .infinity)
|
|
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
TopView(titleName: "Name")
|
|
}
|