struct Pizzeria: View {
let name: String
var body: some View {
Text(“Restaurant: \(name)“)
}
}
struct MainView: View {
var body: some View {
List {
Section(header: Text(“Important tasks”)) {
Pizzeria(name: “Suite Hotel”)
Pizzeria(name: “Radissonn Hotel”)
Pizzeria(name: “Hotel Uttra”)
}
Section(header: Text(“Non Important tasks”)) {
Pizzeria(name: “Suite Hotel”)
Pizzeria(name: “Radissonn Hotel”)
Pizzeria(name: “Hotel Uttra”)
}
}
}
}
There are 0 comments