CategoryRow.swift
- import SwiftUI
- struct CategoryRow: View {
var categoryName: String
var items: [Landmark]
var body: some View {
Text("Hello, World!")
}
- }
- struct CategoryRow_Previews: PreviewProvider {
static var landmarks = ModelData().landmarks
static var previews: some View {
CategoryRow(
categoryName: landmarks[0].category.rawValue,
items: Array(landmarks.prefix(3))
)
}
- }