import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
VStack {
// MyProgressBar2
// normal
MyProgressBar2(.constant(0.3)).border()
// change height
MyProgressBar2(.constant(0.5), height: 40).border()
// change padding
MyProgressBar2(.constant(0.7), padding: 10).border()
// change margin
MyProgressBar2(.constant(0.9), margin: 20).border()
// change bar
MyProgressBar2(.constant(0.7)) {
Gradient.right(.red, .orange, .yellow, .green, .blue, .purple)
}.border()
// NeuProgressBar2
NeuProgressBar2(title: "Sunshine", percent: .constant(0.2)).border()
NeuProgressBar2(title: "Happiness", percent: .constant(1)) {
Gradient.right(.pink, .purple, .red)
}
} // container (VStack)
.padding().background(Neu.color.cardBackground)
}
}
PlaygroundPage.current.setLiveView(ContentView())