CategoryRow.swift


  1. import SwiftUI
  2. struct CategoryRow: View {
  3. var categoryName: String
  4. var items: [Landmark]
  5. var body: some View {
  6. Text("Hello, World!")
  7. }
  8. }
  9. struct CategoryRow_Previews: PreviewProvider {
  10. static var landmarks = ModelData().landmarks
  11. static var previews: some View {
  12. CategoryRow(
  13. categoryName: landmarks[0].category.rawValue,
  14. items: Array(landmarks.prefix(3))
  15. )
  16. }
  17. }