import SwiftUI
// โญ๏ธ `NeuProgressBar2` ็ใๆจ้กใ้จๅ
public struct NeuProgressBarTitle: View {
var title: String
@Binding var percent: CGFloat
public init(title: String, percent: Binding<CGFloat>) {
self._percent = percent // โญ๏ธ ๅณ้ฒ @Binding ่ฎๆธ็ๆนๅผ
self.title = title
}
public var body: some View {
HStack {
// title
Text(self.title)
.foregroundColor(Neu.color.text)
.bold()
Spacer()
// percentage
Text("\(Int(self.percent * 100))%")
.foregroundColor(Neu.color.text)
.bold()
}
}
}