32 lines
633 B
Swift
32 lines
633 B
Swift
|
|
|
|
import SwiftUI
|
|
|
|
|
|
struct BikeSwipeView: TabContent {
|
|
static var title = "BikeSwipe"
|
|
static var image = "bicycle"
|
|
|
|
|
|
@State var bikes = Bike.all
|
|
|
|
var body: some View {
|
|
VStack{
|
|
List {
|
|
ForEach(bikes) { bike in
|
|
Label(bike.name, systemImage: "bicycle")
|
|
.foregroundStyle(.white)
|
|
.padding(5)
|
|
.background(bike.color)
|
|
}.onDelete { bikes.remove(atOffsets: $0)}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
BikeSwipeView()
|
|
}
|